diff options
author | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-08-28 22:31:17 +0000 |
---|---|---|
committer | jonas <jonas@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2015-08-28 22:31:17 +0000 |
commit | 26052b236a2a9646c680763ae11aaec1a5eab5f1 (patch) | |
tree | 0a9f553f85aaaae89c26b0c3dd6503a416cc980d /compiler | |
parent | cd2d531b2e502a80626511df433d4ca7933f9d67 (diff) | |
download | fpc-26052b236a2a9646c680763ae11aaec1a5eab5f1.tar.gz |
* changed paratargetdbg from a global variable into a field of toption
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@31443 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/globals.pas | 2 | ||||
-rw-r--r-- | compiler/options.pas | 10 | ||||
-rw-r--r-- | compiler/pmodules.pas | 6 | ||||
-rw-r--r-- | compiler/scandir.pas | 2 | ||||
-rw-r--r-- | compiler/systems/t_msdos.pas | 2 | ||||
-rw-r--r-- | compiler/systems/t_win.pas | 2 | ||||
-rw-r--r-- | compiler/x86/agx86nsm.pas | 2 |
7 files changed, 13 insertions, 13 deletions
diff --git a/compiler/globals.pas b/compiler/globals.pas index 51d09591c8..d5a8d251e3 100644 --- a/compiler/globals.pas +++ b/compiler/globals.pas @@ -230,7 +230,6 @@ interface asmextraopt : string; { things specified with parameters } - paratargetdbg : tdbg; paralinkoptions : TCmdStr; paradynamiclinker : string; paraprintnodetree : byte; @@ -1370,7 +1369,6 @@ implementation compile_level:=0; codegenerror:=false; DLLsource:=false; - paratargetdbg:=dbg_none; { Output } OutputFileName:=''; diff --git a/compiler/options.pas b/compiler/options.pas index e7e0954c37..f558f6e48a 100644 --- a/compiler/options.pas +++ b/compiler/options.pas @@ -52,6 +52,7 @@ Type ParaAlignment : TAlignmentInfo; paratarget : tsystem; paratargetasm : tasm; + paratargetdbg : tdbg; Constructor Create; Destructor Destroy;override; procedure WriteLogo; @@ -3096,6 +3097,7 @@ begin MacVersionSet:=false; paratarget:=system_none; paratargetasm:=as_none; + paratargetdbg:=dbg_none; end; @@ -3659,11 +3661,11 @@ begin Message1(option_asm_forced,target_asm.idtxt); end; if (af_no_debug in asminfos[option.paratargetasm]^.flags) and - (paratargetdbg<>dbg_none) then + (option.paratargetdbg<>dbg_none) then begin Message1(option_confict_asm_debug, asminfos[option.paratargetasm]^.idtxt); - paratargetdbg:=dbg_none; + option.paratargetdbg:=dbg_none; exclude(init_settings.moduleswitches,cs_debuginfo); end; end; @@ -3671,8 +3673,8 @@ begin option.checkoptionscompatibility; { maybe override debug info format } - if (paratargetdbg<>dbg_none) then - if not set_target_dbg(paratargetdbg) then + if (option.paratargetdbg<>dbg_none) then + if not set_target_dbg(option.paratargetdbg) then Message(option_w_unsupported_debug_format); { switch assembler if it's binary and we got -a on the cmdline } diff --git a/compiler/pmodules.pas b/compiler/pmodules.pas index 7440511429..ab651966dd 100644 --- a/compiler/pmodules.pas +++ b/compiler/pmodules.pas @@ -145,7 +145,7 @@ implementation if not(target_info.system in systems_darwin) and ( (tf_needs_dwarf_cfi in target_info.flags) or - (paratargetdbg in [dbg_dwarf2, dbg_dwarf3]) + (target_dbg.id in [dbg_dwarf2, dbg_dwarf3]) ) then begin current_asmdata.asmlists[al_dwarf_frame].Free; @@ -313,7 +313,7 @@ implementation AddUnit('heaptrc'); { Lineinfo unit } if (cs_use_lineinfo in current_settings.globalswitches) then begin - case paratargetdbg of + case target_dbg.id of dbg_stabs: AddUnit('lineinfo'); dbg_stabx: @@ -434,7 +434,7 @@ implementation if s='LINEINFO' then begin Message(parser_w_no_lineinfo_use_switch); - if (paratargetdbg in [dbg_dwarf2, dbg_dwarf3]) then + if (target_dbg.id in [dbg_dwarf2, dbg_dwarf3]) then s := 'LNFODWRF'; sorg := s; end; diff --git a/compiler/scandir.pas b/compiler/scandir.pas index 4f3bfdca09..cec89b7af7 100644 --- a/compiler/scandir.pas +++ b/compiler/scandir.pas @@ -1203,7 +1203,7 @@ unit scandir; procedure dir_smartlink; begin do_moduleswitch(cs_create_smart); - if (paratargetdbg in [dbg_dwarf2,dbg_dwarf3]) and + if (target_dbg.id in [dbg_dwarf2,dbg_dwarf3]) and not(target_info.system in (systems_darwin+[system_i8086_msdos])) and { smart linking does not yet work with DWARF debug info on most targets } (cs_create_smart in current_settings.moduleswitches) and diff --git a/compiler/systems/t_msdos.pas b/compiler/systems/t_msdos.pas index a47b6a5567..3c9a4166d9 100644 --- a/compiler/systems/t_msdos.pas +++ b/compiler/systems/t_msdos.pas @@ -265,7 +265,7 @@ begin LinkRes.Add('option quiet'); - if paratargetdbg in [dbg_dwarf2,dbg_dwarf3,dbg_dwarf4] then + if target_dbg.id in [dbg_dwarf2,dbg_dwarf3,dbg_dwarf4] then LinkRes.Add('debug dwarf'); { add objectfiles, start with prt0 always } diff --git a/compiler/systems/t_win.pas b/compiler/systems/t_win.pas index fec90ffad1..cf89332d59 100644 --- a/compiler/systems/t_win.pas +++ b/compiler/systems/t_win.pas @@ -956,7 +956,7 @@ implementation imagebase:=$10000 else {$ifdef cpu64bitaddr} - if (paratargetdbg = dbg_stabs) then + if (target_dbg.id = dbg_stabs) then imagebase:=$400000 else imagebase:= $100000000; diff --git a/compiler/x86/agx86nsm.pas b/compiler/x86/agx86nsm.pas index cd5ac42f40..be3e6560e8 100644 --- a/compiler/x86/agx86nsm.pas +++ b/compiler/x86/agx86nsm.pas @@ -1098,7 +1098,7 @@ interface AsmWriteLn('GROUP DGROUP rodata data fpc bss stack heap') else AsmWriteLn('GROUP DGROUP rodata data fpc bss'); - if paratargetdbg in [dbg_dwarf2,dbg_dwarf3,dbg_dwarf4] then + if target_dbg.id in [dbg_dwarf2,dbg_dwarf3,dbg_dwarf4] then begin AsmWriteLn('SECTION .debug_frame use32 class=DWARF align=4'); AsmWriteLn('SECTION .debug_info use32 class=DWARF align=4'); |