aboutsummaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-mediacentre/xbmc/xbmc/0004-configure-cope-with-ld-is-gold-DISTRO_FEATURE.patch
blob: 345e20ee196d8a18ea41b23b6ff213690a64d1ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From fd8f73826240aae543a41a2bfeea0056e2fe594d Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen@dominion.thruhere.net>
Date: Mon, 11 Mar 2013 11:04:29 +0100
Subject: [PATCH] configure: cope with ld-is-gold DISTRO_FEATURE

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
---

Upstream-Stature: backport

 configure.in |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/configure.in b/configure.in
index ef94683..c8b459b 100755
--- a/configure.in
+++ b/configure.in
@@ -18,9 +18,14 @@ tolower(){
 # check for library basenames
 AC_DEFUN([XB_FIND_SONAME],
 [
+  #set -x
   if [[ "$host_vendor" != "apple" ]]; then
     AC_MSG_CHECKING([for lib$2 soname])
     $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}')
+    if [[ -z $$1_FILENAME ]]; then
+      #try gold linker syntax
+      $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "$2")
+    fi
     if [[ ! -z $$1_FILENAME ]]; then
       $1_SONAME=$(objdump -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}')
     fi
@@ -55,6 +60,7 @@ AC_DEFUN([XB_FIND_SONAME],
     AC_MSG_RESULT([$$1_SONAME])
     AC_SUBST($1_SONAME)
   fi
+  #set +x
 ])
 
 # Function to push and pop libs and includes for a command
-- 
1.7.7.6