2
0
Эх сурвалжийг харах

* only pass --gc-sections to the linker if smart linking is enabled
(mantis #24396)

git-svn-id: trunk@24465 -

Jonas Maebe 12 жил өмнө
parent
commit
b16677a75b

+ 2 - 1
compiler/systems/t_linux.pas

@@ -1062,7 +1062,8 @@ begin
    StripStr:='-s';
    StripStr:='-s';
   if (cs_link_map in current_settings.globalswitches) then
   if (cs_link_map in current_settings.globalswitches) then
    StripStr:='-Map '+maybequoted(ChangeFileExt(current_module.exefilename,'.map'));
    StripStr:='-Map '+maybequoted(ChangeFileExt(current_module.exefilename,'.map'));
-  if create_smartlink_sections then
+  if (cs_link_smart in current_settings.globalswitches) and
+     create_smartlink_sections then
    GCSectionsStr:='--gc-sections';
    GCSectionsStr:='--gc-sections';
   If (cs_profile in current_settings.moduleswitches) or
   If (cs_profile in current_settings.moduleswitches) or
      ((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then
      ((Info.DynamicLinker<>'') and (not SharedLibFiles.Empty)) then