Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/busybox/files/
Date: Tue, 01 Dec 2015 16:30:14
Message-Id: 1448987403.32c3b1e4bc0ef44b329c1e95366ed5f05059c125.vapier@gentoo
1 commit: 32c3b1e4bc0ef44b329c1e95366ed5f05059c125
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Tue Dec 1 16:29:55 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 1 16:30:03 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=32c3b1e4
7
8 sys-apps/busybox: fix builds w/LDFLAGS=-fuse-ld=gold #499712
9
10 .../files/busybox-1.24.1-trylink-ldflags.patch | 32 ++++++++++++++++++++++
11 1 file changed, 32 insertions(+)
12
13 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
14 new file mode 100644
15 index 0000000..9d61ceb
16 --- /dev/null
17 +++ b/sys-apps/busybox/files/busybox-1.24.1-trylink-ldflags.patch
18 @@ -0,0 +1,32 @@
19 +From 77e2bde6a50f0f6b9b3c9983c86e661a9872b5f6 Mon Sep 17 00:00:00 2001
20 +From: Mike Frysinger <vapier@g.o>
21 +Date: Tue, 1 Dec 2015 11:25:10 -0500
22 +Subject: [PATCH] trylink: include LDFLAGS when checking linkage
23 +
24 +The user might be including options in their LDFLAGS (like -fuse-ld=gold)
25 +that change the behavior of the linker and thus change the results of the
26 +flag tests. Make sure we include the user's LDFLAGS when running these
27 +tests so we filter out flags that will fail when used later on.
28 +
29 +URL: https://bugs.gentoo.org/499712
30 +Signed-off-by: Mike Frysinger <vapier@g.o>
31 +---
32 + scripts/trylink | 2 +-
33 + 1 file changed, 1 insertion(+), 1 deletion(-)
34 +
35 +diff --git a/scripts/trylink b/scripts/trylink
36 +index 6e1187e..3c431ed 100755
37 +--- a/scripts/trylink
38 ++++ b/scripts/trylink
39 +@@ -54,7 +54,7 @@ check_cc() {
40 + # "eval" may be needed if CFLAGS can contain
41 + # '... -D"BB_VER=KBUILD_STR(1.N.M)" ...'
42 + # and we need shell to process quotes!
43 +- $CC $CFLAGS $1 "$tempname".c -o "$tempname" >/dev/null 2>&1
44 ++ $CC $CFLAGS $LDFLAGS $1 "$tempname".c -o "$tempname" >/dev/null 2>&1
45 + r=$?
46 + rm -f "$tempname" "$tempname".c "$tempname".o
47 + return $r
48 +--
49 +2.6.2
50 +