[uClibc]-Wl broken gcc-uClibc.c

Miles Bader miles at lsi.nec.co.jp
Thu Feb 21 02:10:23 UTC 2002


The most recent changes to `extra/gcc-uClibc/gcc-uClibc.c' made it
ignore all `-Wl' options.  Here's a patch to fix it [the first hunk
actually just fixes a mis-indented line]:


--- gcc-uClibc.c.~1.27.~	Thu Feb 21 09:37:12 2002
+++ gcc-uClibc.c	Thu Feb 21 11:00:08 2002
@@ -245,7 +245,7 @@ int main(int argc, char **argv)
 						use_static_linking = 1;
 					}
 					break;
-			    case 'W':		/* -static could be passed directly to ld */
+				case 'W':	/* -static could be passed directly to ld */
 					if (strncmp("-Wl,",argv[i],4) == 0) {
 						if (strstr(argv[i],static_linking) != 0) {
 							use_static_linking = 1;
@@ -290,10 +290,9 @@ int main(int argc, char **argv)
 			continue;
 		} else if (strstr(argv[j],static_linking) != NULL) {
 			continue;
-		} else if (strncmp("-Wl,",argv[j], 2) == 0) {
-			if (strstr(argv[j],static_linking) != NULL) {
-				continue;
-			}
+		} else if (strncmp("-Wl,",argv[j], 2) == 0
+			   && strstr(argv[j],static_linking) != NULL) {
+			continue;
 		} else {
 			gcc_argument[k++] = argv[j];
 			gcc_argument[k] = '\0';


Thanks,

-Miles
-- 
Saa, shall we dance?  (from a dance-class advertisement)



More information about the uClibc mailing list