summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-12-01 11:29:55 -0500
committerMike Frysinger <vapier@gentoo.org>2015-12-01 11:30:03 -0500
commit32c3b1e4bc0ef44b329c1e95366ed5f05059c125 (patch)
treefc40d475ee01806a2dc44d98b7351a781251bcbb /sys-apps
parentnet-mail/cyrus-imapd: version bump to 2.5.7 (diff)
downloadgentoo-32c3b1e4bc0ef44b329c1e95366ed5f05059c125.tar.gz
gentoo-32c3b1e4bc0ef44b329c1e95366ed5f05059c125.tar.bz2
gentoo-32c3b1e4bc0ef44b329c1e95366ed5f05059c125.zip
sys-apps/busybox: fix builds w/LDFLAGS=-fuse-ld=gold #499712
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/busybox/files/busybox-1.24.1-trylink-ldflags.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-apps/busybox/files/busybox-1.24.1-trylink-ldflags.patch b/sys-apps/busybox/files/busybox-1.24.1-trylink-ldflags.patch
new file mode 100644
index 000000000000..9d61ceb7badf
--- /dev/null
+++ b/sys-apps/busybox/files/busybox-1.24.1-trylink-ldflags.patch
@@ -0,0 +1,32 @@
+From 77e2bde6a50f0f6b9b3c9983c86e661a9872b5f6 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Tue, 1 Dec 2015 11:25:10 -0500
+Subject: [PATCH] trylink: include LDFLAGS when checking linkage
+
+The user might be including options in their LDFLAGS (like -fuse-ld=gold)
+that change the behavior of the linker and thus change the results of the
+flag tests. Make sure we include the user's LDFLAGS when running these
+tests so we filter out flags that will fail when used later on.
+
+URL: https://bugs.gentoo.org/499712
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ scripts/trylink | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/trylink b/scripts/trylink
+index 6e1187e..3c431ed 100755
+--- a/scripts/trylink
++++ b/scripts/trylink
+@@ -54,7 +54,7 @@ check_cc() {
+ # "eval" may be needed if CFLAGS can contain
+ # '... -D"BB_VER=KBUILD_STR(1.N.M)" ...'
+ # and we need shell to process quotes!
+- $CC $CFLAGS $1 "$tempname".c -o "$tempname" >/dev/null 2>&1
++ $CC $CFLAGS $LDFLAGS $1 "$tempname".c -o "$tempname" >/dev/null 2>&1
+ r=$?
+ rm -f "$tempname" "$tempname".c "$tempname".o
+ return $r
+--
+2.6.2
+