winegcc: linking fixes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This one got lost somewhere, resending...

ChangeLog
  Pass only the -o -l -L options to winewrap, ignore the rest.

Index: tools/winegcc.c
===================================================================
RCS file: /var/cvs/wine/tools/winegcc.c,v
retrieving revision 1.4
diff -u -r1.4 winegcc.c
--- tools/winegcc.c	3 Jan 2003 22:31:56 -0000	1.4
+++ tools/winegcc.c	3 Jan 2003 22:03:23 -0000
@@ -114,7 +114,27 @@
     {
 	gcc_argv[i++] = BINDIR "/winewrap";
 	if (gui_app) gcc_argv[i++] = "-mgui";
-	if (cpp) gcc_argv[i++] = "-C";
+
+	if (cpp) gcc_argv[i++] = "-C";	
+    	for ( j = 1 ; j < argc ; j++ ) 
+    	{
+	    if ( argv[j][0] == '-' )
+	    {
+		switch (argv[j][1])
+		{
+		case 'L':
+		case 'l':
+		case 'o':
+		    gcc_argv[i++] = argv[j];
+		    break;
+		default:
+		    ; /* ignore the rest */
+		}
+	    }
+	    else
+		gcc_argv[i++] = argv[j];
+	}
+	if (use_stdlib && use_msvcrt) gcc_argv[i++] = "-lmsvcrt";
     }
     else
     {
@@ -132,24 +152,20 @@
 	gcc_argv[i++] = "-D__int16=short";
 	gcc_argv[i++] = "-D__int32=int";
 	gcc_argv[i++] = "-D__int64=long long";
-    }
 
-    for ( j = 1 ; j < argc ; j++ ) 
-    {
-	if (strcmp("-mno-cygwin", argv[j]) == 0)
-	    ; /* ignore this option */
-	else if (strcmp("-mwindows", argv[j]) == 0)
-	    ; /* ignore this option */
-	else if (strcmp("-s", argv[j]) == 0)
-	    ; /* ignore this option */
-        else
-            gcc_argv[i++] = argv[j];
+    	for ( j = 1 ; j < argc ; j++ ) 
+    	{
+	    if (strcmp("-mno-cygwin", argv[j]) == 0)
+	    	; /* ignore this option */
+	    else if (strcmp("-mwindows", argv[j]) == 0)
+	    	; /* ignore this option */
+	    else if (strcmp("-s", argv[j]) == 0)
+	    	; /* ignore this option */
+            else
+            	gcc_argv[i++] = argv[j];
+    	}
     }
 
-    if (linking)
-    {
-	if (use_stdlib && use_msvcrt) gcc_argv[i++] = "-lmsvcrt";
-    }
     gcc_argv[i] = NULL;
 
     if (verbose)


-- 
Dimi.



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux