瀏覽代碼

+ Fix commit 19061, by restoring cs_link_smart code and disabling
cs_create_smart if using dwarf information and external assembler
debug information as this is not compatible.
* Added a different message for cs_create_smart.

git-svn-id: trunk@19065 -

pierre 14 年之前
父節點
當前提交
a5d2840980
共有 2 個文件被更改,包括 13 次插入2 次删除
  1. 4 1
      compiler/msg/errore.msg
  2. 9 1
      compiler/options.pas

+ 4 - 1
compiler/msg/errore.msg

@@ -2819,7 +2819,7 @@ unit_u_indirect_crc_changed=10062_U_Indirect interface (objects/classes) CRC cha
 #
 #  Options
 #
-# 11048 is the last used one
+# 11049 is the last used one
 #
 option_usage=11000_O_$1 [options] <inputfile> [options]
 # BeginOfTeX
@@ -2945,6 +2945,9 @@ option_ignored_target=11047_W_Option "$1" is ignored for the current target plat
 option_debug_external_unsupported=11048_W_Disabling external debug information because it is unsupported for the selected target/debug format combination.
 % Not all debug formats can be stored in an external file on all platforms. In particular, on
 % Mac OS X only DWARF debug information can be stored externally.
+option_dwarf_smartlink_creation=11049_N_DWARF debug information cannot be used with smart linking with external assembler, disabling static library creation.  
+% Smart linking is currently incompatble with DWARF debug information on most
+% platforms, so smart linking is disabled in such cases.
 %\end{description}
 # EndOfTeX
 

+ 9 - 1
compiler/options.pas

@@ -2307,9 +2307,17 @@ begin
   if (paratargetdbg in [dbg_dwarf2,dbg_dwarf3]) and
      not(target_info.system in systems_darwin) then
     begin
-      { smart linking does not yet work with DWARF debug info on most targets }
+      { smartlink creation does not yet work with DWARF 
+        debug info on most targets, but it works in internal assembler }
       if (cs_create_smart in init_settings.moduleswitches) and
          not (af_outputbinary in target_asm.flags) then
+        begin
+          Message(option_dwarf_smartlink_creation);
+          exclude(init_settings.moduleswitches,cs_create_smart);
+        end;
+
+      { smart linking does not yet work with DWARF debug info on most targets }
+      if (cs_link_smart in init_settings.globalswitches) then
         begin
           Message(option_dwarf_smart_linking);
           ForceStaticLinking;