Package: oss4
Version: None
Severity: minor
Tags: patch upstream
User: [email protected]
Usertags: origin-ubuntu oneiric ubuntu-patch

In Ubuntu, the attached patch was applied to achieve the following:

  * ld-as-needed.patch: Re-order CC arguments to enable building with ld
    --as-needed (LP: #770972)

I didn't forward it upstream because they don't seem to have a public
bug tracker. I hope you have some existing patch path.

Thanks for considering the patch.

SR

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_ZA.UTF-8, LC_CTYPE=en_ZA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
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 $(LIBRARIES) $(LDFLAGS)\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 $(LIBRARIES) $(LDFLAGS)\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");
 	}

Reply via email to