Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | From fd8f73826240aae543a41a2bfeea0056e2fe594d Mon Sep 17 00:00:00 2001 |
| 2 | From: Koen Kooi <koen@dominion.thruhere.net> |
| 3 | Date: Mon, 11 Mar 2013 11:04:29 +0100 |
| 4 | Subject: [PATCH] configure: cope with ld-is-gold DISTRO_FEATURE |
| 5 | |
| 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> |
| 7 | --- |
| 8 | |
| 9 | Upstream-Stature: backport |
| 10 | |
| 11 | configure.in | 12 +++++++----- |
| 12 | 1 files changed, 7 insertions(+), 5 deletions(-) |
| 13 | |
| 14 | diff --git a/configure.in b/configure.in |
| 15 | index 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 | -- |
| 42 | 1.7.7.6 |
| 43 | |