Explorar o código

* fix setting of internal/external linker

git-svn-id: trunk@3612 -
peter %!s(int64=19) %!d(string=hai) anos
pai
achega
0bb57006e5
Modificáronse 1 ficheiros con 3 adicións e 12 borrados
  1. 3 12
      compiler/options.pas

+ 3 - 12
compiler/options.pas

@@ -2190,12 +2190,12 @@ begin
      set_target_asm(target_info.assemextern);
    end;
 
-  { disable internal linker if it is not registered or
-    if we skip the linking }
+  { Force use of external linker if there is no
+    internal linker or the linking is skipped }
   if not(cs_link_extern in initglobalswitches) and
      (not assigned(target_info.link) or
       (cs_link_nolink in initglobalswitches)) then
-    exclude(initglobalswitches,cs_link_extern);
+    include(initglobalswitches,cs_link_extern);
 
   { turn off stripping if compiling with debuginfo or profile }
   if (cs_debuginfo in initmoduleswitches) or
@@ -2211,15 +2211,6 @@ begin
      (target_info.system in [system_i386_win32,system_x86_64_win64]) then
     exclude(target_info.flags,tf_smartlink_sections);
 
-  if (cs_link_extern in initglobalswitches) then
-    begin
-      { By default don't create import section if we use the internal linker }
-      if not GenerateImportSectionSetExplicitly then
-        GenerateImportSection:=false;
-      { Enable section smartlinking }
-      include(target_info.flags,tf_smartlink_sections);
-    end;
-
 {$ifdef x86_64}
   {$warning HACK: turn off smartlinking}
   exclude(initmoduleswitches,cs_create_smart);