* set tf_dwarf_relative_addresses for win32

* switch to external assembler when using dwarf debug info for win32,
    because the internal assembler doesn't work with
    tf_dwarf_relative_addresses
   (mantis #12872)

git-svn-id: trunk@12592 -
This commit is contained in:
Jonas Maebe 2009-01-25 13:24:02 +00:00
parent 5b7439438c
commit 0768f82770
2 changed files with 22 additions and 1 deletions

View File

@ -58,6 +58,7 @@ Type
procedure Read_Parameters;
procedure parsecmd(cmd:string);
procedure TargetOptions(def:boolean);
procedure CheckOptionsCompatibility;
end;
TOptionClass=class of toption;
@ -2151,6 +2152,19 @@ begin
features:=features+target_unsup_features;
end;
procedure TOption.checkoptionscompatibility;
begin
{ the internal assembler does not yet support tf_dwarf_relative_addresses,
which is required for dwarf on win32 (mantis 12872)
}
if (paratargetdbg in [dbg_dwarf2,dbg_dwarf3]) and
(target_info.system = system_i386_win32) then
begin
Message(option_switch_bin_to_src_assembler);
set_target_asm(target_info.assemextern);
end;
end;
constructor TOption.create;
begin
@ -2454,6 +2468,12 @@ begin
if option.quickinfo<>'' then
option.writequickinfo;
end;
{ check the compatibility of different options and adjust them if necessary
(and print possible errors)
}
option.checkoptionscompatibility;
{ Stop if errors in options }
if ErrorCount>0 then
StopOptions(1);

View File

@ -37,7 +37,8 @@ unit i_win;
flags : [tf_files_case_aware,tf_has_dllscanner,tf_use_function_relative_addresses,tf_smartlink_library
,tf_smartlink_sections{,tf_section_threadvars}{,tf_needs_dwarf_cfi},
tf_winlikewidestring,tf_no_pic_supported,
tf_no_generic_stackcheck,tf_has_winlike_resources];
tf_no_generic_stackcheck,tf_has_winlike_resources,
tf_dwarf_relative_addresses];
cpu : cpu_i386;
unit_env : 'WIN32UNITS';
extradefines : 'MSWINDOWS;WINDOWS';