Ver código fonte

* use app_type instead of RelocSection for creating bundles, as
RelocSection is automatically set for all shared libraries

git-svn-id: trunk@8219 -

Jonas Maebe 18 anos atrás
pai
commit
4cdd590091
3 arquivos alterados com 10 adições e 4 exclusões
  1. 2 1
      compiler/globtype.pas
  2. 6 1
      compiler/options.pas
  3. 2 2
      compiler/systems/t_bsd.pas

+ 2 - 1
compiler/globtype.pas

@@ -214,7 +214,8 @@ interface
          app_fs,        { full-screen type application (OS/2 and EMX only) }
          app_tool,      { tool application, (MPW tool for MacOS, MacOS only)}
          app_arm7,
-         app_arm9
+         app_arm9,
+         app_bundle     { dynamically loadable bundle, Darwin only }
        );
 
        { interface types }

+ 6 - 1
compiler/options.pas

@@ -1259,7 +1259,12 @@ begin
                     'b':
                       begin
                         if (target_info.system in systems_darwin) then
-                          RelocSection:=not UnsetBool(More, j)
+                          begin
+                            if not UnsetBool(More, j) then
+                              apptype:=app_bundle
+                            else
+                              apptype:=app_cui
+                          end
                         else
                           IllegalPara(opt);
                       end;

+ 2 - 2
compiler/systems/t_bsd.pas

@@ -234,7 +234,7 @@ begin
          else
            begin
              ExeCmd[1]:='ld $OPT $DYNLINK $STATIC $GCSECTIONS $STRIP -multiply_defined suppress -L. -o $EXE `cat $RES`';
-             if (not RelocSection) then
+             if (apptype<>app_bundle) then
                DllCmd[1]:='libtool $OPT -dynamic -multiply_defined suppress -L. -o $EXE `cat $RES`'
              else
                DllCmd[1]:='ld $OPT -dynamic -bundle -multiply_defined suppress -L. -o $EXE `cat $RES`'
@@ -357,7 +357,7 @@ begin
           end
       else
         begin
-          if RelocSection then
+          if (apptype=app_bundle) then
             begin
               if librarysearchpath.FindFile('bundle1.o',false,s) then
                 prtobj:=s