blob: 345e20ee196d8a18ea41b23b6ff213690a64d1ba [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001From fd8f73826240aae543a41a2bfeea0056e2fe594d Mon Sep 17 00:00:00 2001
2From: Koen Kooi <koen@dominion.thruhere.net>
3Date: Mon, 11 Mar 2013 11:04:29 +0100
4Subject: [PATCH] configure: cope with ld-is-gold DISTRO_FEATURE
5
6Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
7---
8
9Upstream-Stature: backport
10
11 configure.in | 12 +++++++-----
12 1 files changed, 7 insertions(+), 5 deletions(-)
13
14diff --git a/configure.in b/configure.in
15index ef94683..c8b459b 100755
16--- a/configure.in
17+++ b/configure.in
18@@ -18,9 +18,14 @@ tolower(){
19 # check for library basenames
20 AC_DEFUN([XB_FIND_SONAME],
21 [
22+ #set -x
23 if [[ "$host_vendor" != "apple" ]]; then
24 AC_MSG_CHECKING([for lib$2 soname])
25 $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
26+ if [[ -z $$1_FILENAME ]]; then
27+ #try gold linker syntax
28+ $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "$2")
29+ fi
30 if [[ ! -z $$1_FILENAME ]]; then
31 $1_SONAME=$(objdump -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}')
32 fi
33@@ -55,6 +60,7 @@ AC_DEFUN([XB_FIND_SONAME],
34 AC_MSG_RESULT([$$1_SONAME])
35 AC_SUBST($1_SONAME)
36 fi
37+ #set +x
38 ])
39
40 # Function to push and pop libs and includes for a command
41--
421.7.7.6
43