[Wine] Wine on Tiger

Charles Davis cdavis at mymail.mines.edu
Sat Oct 1 01:43:49 CDT 2011


On Sep 30, 2011, at 5:26 PM, mrivera wrote:
> ../../../tools/winegcc/winegcc -m32 -B../../../tools/winebuild --sysroot=../../..  -s -Wb,-F,advapi32_test.exe  cred.o crypt.o crypt_lmhash.o crypt_md4.o crypt_md5.o crypt_sha.o eventlog.o lsa.o registry.o security.o service.o           testlist.o -o advapi32_test-stripped.exe.so ../../../libs/port/libwine_port.a -lole32 -ladvapi32   
> /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: can't use -s with -bundle (file must contain at least global symbols, for maximum stripping use -x)
Does this patch help? (Copy and paste into a plain text file, save it, and then apply with patch(1) like so:

 patch -p1 <patchfile.txt

or git apply if you're building from git:

 git apply patchfile.txt

from the wine source directory. Replace 'patchfile.txt' with whatever you saved the patch file as.)

Chip

diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c
index 3a7e93a..adb1873 100644
--- a/tools/winegcc/winegcc.c
+++ b/tools/winegcc/winegcc.c
@@ -199,6 +199,7 @@ struct options
     int force_pointer_size;
     int large_address_aware;
     int unwind_tables;
+    int strip;
     const char* wine_objdir;
     const char* output_name;
     const char* image_base;
@@ -1009,6 +1010,8 @@ static void build(struct options* opts)
             strarray_add(link_args, "-image_base");
             strarray_add(link_args, opts->image_base);
         }
+        if (opts->strip)
+            strarray_add(link_args, "-Wl,-x");
         break;
     case PLATFORM_SOLARIS:
         {
@@ -1417,6 +1420,15 @@ int main(int argc, char **argv)
 			opts.shared = 1;
                         raw_compiler_arg = raw_linker_arg = 0;
 		    }
+                    else if (strcmp("-s", argv[i]) == 0 && opts.target_platform == PLATFORM_APPLE)
+                    {
+                        /* On Mac, change -s into -Wl,-x. ld's -s switch
+                         * is deprecated, and it doesn't work on Tiger with
+                         * MH_BUNDLEs anyway
+                         */
+                        opts.strip = 1;
+                        raw_linker_arg = 0;
+                    }
                     break;
                 case 'v':
                     if (argv[i][2] == 0) verbose++;
-- 
1.7.6.1





More information about the wine-users mailing list