retitle 630737 oss4: Build failure with ld --as-needed
thanks

Whoops, I probably should have put LDFLAGS before libraries:

Description: Re-order GCC arguments to enable building with ld --as-needed.
Author: Stefano Rivera <[email protected]>
Last-Update: 2011-06-16
Forwarded: no
--- a/setup/srcconf.c
+++ b/setup/srcconf.c
@@ -1170,7 +1170,7 @@
 
       fprintf (f, "$(BINDIR)/%s:\t$(OBJECTS)\n", name);
       fprintf (f,
-              "\t$(CC) $(CFLAGS) $(LIBRARIES) $(LDFLAGS) -s -o $(BINDIR)/%s 
$(OBJECTS) %s\n",
+              "\t$(CC) $(CFLAGS) -s -o $(BINDIR)/%s $(OBJECTS) %s $(LDFLAGS) 
$(LIBRARIES)\n",
               name, extra_libraries);
       fprintf (f, "\n\n");
     }
@@ -1199,7 +1199,7 @@
 
       fprintf (f, "$(SBINDIR)/%s:\t$(OBJECTS)\n", name);
       fprintf (f,
-              "\t$(CC) $(CFLAGS) $(LIBRARIES) $(LDFLAGS) -s -o $(SBINDIR)/%s 
$(OBJECTS) %s\n",
+              "\t$(CC) $(CFLAGS) -s -o $(SBINDIR)/%s $(OBJECTS) %s $(LDFLAGS) 
$(LIBRARIES)\n",
               name, extra_libraries);
       fprintf (f, "\n\n");
     }
@@ -1226,7 +1226,7 @@
                     obj_src[i], objdir, objects[i]);
          else
            fprintf (f,
-                    "\t$(CC) -c $(CFLAGS) $(OSFLAGS) $(LIBRARIES) $(INCLUDES) 
%s -o $(%s)/%s\n",
+                    "\t$(CC) -c $(CFLAGS) $(OSFLAGS) $(INCLUDES) %s -o 
$(%s)/%s $(LIBRARIES)\n",
                     obj_src[i], objdir, objects[i]);
          fprintf (f, "\n");
        }



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to