summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Rules.mak3
-rw-r--r--libpthread/linuxthreads.old_db/Makefile.in2
-rw-r--r--libpthread/linuxthreads_db/Makefile.in2
3 files changed, 5 insertions, 2 deletions
diff --git a/Rules.mak b/Rules.mak
index bc02fb068..a3a1b5f50 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -114,6 +114,9 @@ check_gcc=$(shell \
check_as=$(shell \
if $(CC) -Wa,$(1) -Wa,-Z -c -o /dev/null -xassembler /dev/null > /dev/null 2>&1; \
then echo "-Wa,$(1)"; fi)
+check_ld=$(shell \
+ if $(LD) $(1) -o /dev/null -b binary /dev/null > /dev/null 2>&1; \
+ then echo "$(1)"; fi)
ARFLAGS:=cr
diff --git a/libpthread/linuxthreads.old_db/Makefile.in b/libpthread/linuxthreads.old_db/Makefile.in
index 0c5f7585a..d01db5168 100644
--- a/libpthread/linuxthreads.old_db/Makefile.in
+++ b/libpthread/linuxthreads.old_db/Makefile.in
@@ -8,7 +8,7 @@
# Get the thread include dependencies and shared object name
CFLAGS-linuxthreads.old_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s --warn-unresolved-symbols
+LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s $(call check_ld,--warn-unresolved-symbols)
LIBS-libthread_db.so := $(LIBS)
diff --git a/libpthread/linuxthreads_db/Makefile.in b/libpthread/linuxthreads_db/Makefile.in
index ec6afc016..06106e8af 100644
--- a/libpthread/linuxthreads_db/Makefile.in
+++ b/libpthread/linuxthreads_db/Makefile.in
@@ -8,7 +8,7 @@
# Get the thread include dependencies and shared object name
CFLAGS-linuxthreads_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
-LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s --warn-unresolved-symbols
+LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) -s $(call check_ld,--warn-unresolved-symbols)
LIBS-libthread_db.so := $(LIBS)