Browse Source

* pass -no_dead_strip_inits_and_terms to the linker, since we use these for
dynamic library initialization (this automatically enables dead code
stripping/smart linking in all cases though, independent of -XX/CX;
on the other hand, there is no real reason not to use it anymore on
Mac OS X, since support was introduced in Xcode 1.5 for
Mac OS X 10.3.9 and that's also the earliest version we support
for running FPC on)

git-svn-id: trunk@13151 -

Jonas Maebe 16 years ago
parent
commit
47c28c2db3
1 changed files with 3 additions and 3 deletions
  1. 3 3
      compiler/systems/t_bsd.pas

+ 3 - 3
compiler/systems/t_bsd.pas

@@ -152,11 +152,11 @@ begin
            end
            end
          else
          else
            begin
            begin
-             ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE `cat $RES`';
+             ExeCmd[1]:='ld $PRTOBJ $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -no_dead_strip_inits_and_terms -multiply_defined suppress -L. -o $EXE `cat $RES`';
              if (apptype<>app_bundle) then
              if (apptype<>app_bundle) then
-               DllCmd[1]:='libtool $PRTOBJ $OPT -dynamic -multiply_defined suppress -L. -o $EXE `cat $RES`'
+               DllCmd[1]:='libtool $PRTOBJ $OPT -no_dead_strip_inits_and_terms -dynamic -multiply_defined suppress -L. -o $EXE `cat $RES`'
              else
              else
-               DllCmd[1]:='ld $PRTOBJ $OPT -dynamic -bundle -multiply_defined suppress -L. -o $EXE `cat $RES`'
+               DllCmd[1]:='ld $PRTOBJ $OPT -no_dead_strip_inits_and_terms -dynamic -bundle -multiply_defined suppress -L. -o $EXE `cat $RES`'
            end
            end
        end
        end
      else
      else