~ubuntu-branches/ubuntu/oneiric/oss4/oneiric-proposed

« back to all changes in this revision

Viewing changes to debian/patches/ld-as-needed.patch

  • Committer: Bazaar Package Importer
  • Author(s): Stefano Rivera
  • Date: 2011-06-16 20:37:48 UTC
  • mfrom: (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20110616203748-jbrxik6ql33z54co
Tags: 4.2-build2004-1ubuntu1
* Merge from Debian unstable.
  - Supports our current kernel (LP: #746048)
  Remaining changes:
  - debian/oss4-dkms.dkms.in: s/source/build/ in Kernel headers paths.
* ld-as-needed.patch: Re-order CC arguments to enable building with ld
  --as-needed (LP: #770972)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Re-order GCC arguments to enable building with ld --as-needed.
 
2
Author: Stefano Rivera <stefanor@ubuntu.com>
 
3
Last-Update: 2011-06-16
 
4
Bug-Ubuntu: https://launchpad.net/bugs/770972
 
5
Bug-Debian: http://bugs.debian.org/630737
 
6
Forwarded: no
 
7
--- a/setup/srcconf.c
 
8
+++ b/setup/srcconf.c
 
9
@@ -1170,7 +1170,7 @@
 
10
 
 
11
       fprintf (f, "$(BINDIR)/%s:\t$(OBJECTS)\n", name);
 
12
       fprintf (f,
 
13
-              "\t$(CC) $(CFLAGS) $(LIBRARIES) $(LDFLAGS) -s -o $(BINDIR)/%s $(OBJECTS) %s\n",
 
14
+              "\t$(CC) $(CFLAGS) -s -o $(BINDIR)/%s $(OBJECTS) %s $(LIBRARIES) $(LDFLAGS)\n",
 
15
               name, extra_libraries);
 
16
       fprintf (f, "\n\n");
 
17
     }
 
18
@@ -1199,7 +1199,7 @@
 
19
 
 
20
       fprintf (f, "$(SBINDIR)/%s:\t$(OBJECTS)\n", name);
 
21
       fprintf (f,
 
22
-              "\t$(CC) $(CFLAGS) $(LIBRARIES) $(LDFLAGS) -s -o $(SBINDIR)/%s $(OBJECTS) %s\n",
 
23
+              "\t$(CC) $(CFLAGS) -s -o $(SBINDIR)/%s $(OBJECTS) %s $(LIBRARIES) $(LDFLAGS)\n",
 
24
               name, extra_libraries);
 
25
       fprintf (f, "\n\n");
 
26
     }
 
27
@@ -1226,7 +1226,7 @@
 
28
                     obj_src[i], objdir, objects[i]);
 
29
          else
 
30
            fprintf (f,
 
31
-                    "\t$(CC) -c $(CFLAGS) $(OSFLAGS) $(LIBRARIES) $(INCLUDES) %s -o $(%s)/%s\n",
 
32
+                    "\t$(CC) -c $(CFLAGS) $(OSFLAGS) $(INCLUDES) %s -o $(%s)/%s $(LIBRARIES)\n",
 
33
                     obj_src[i], objdir, objects[i]);
 
34
          fprintf (f, "\n");
 
35
        }