summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/Makefile.in6
1 files changed, 4 insertions, 2 deletions
diff --git a/libc/Makefile.in b/libc/Makefile.in
index 88b61819a..1e0b58437 100644
--- a/libc/Makefile.in
+++ b/libc/Makefile.in
@@ -33,8 +33,10 @@ include $(libc_DIR)/unistd/Makefile.in
# Check if the target architecture has a version script for
# libc, and if so, include it when linking.
-VERSION_SCRIPT:=${shell if [ -f $(libc_DIR)/sysdeps/linux/$(TARGET_ARCH)/libc.map ] ; then \
- echo "--version-script $(libc_DIR)/sysdeps/linux/$(TARGET_ARCH)/libc.map"; fi}
+VERSION_SCRIPT := $(wildcard $(libc_DIR)/sysdeps/linux/$(TARGET_ARCH)/libc.map)
+ifneq ($(VERSION_SCRIPT),)
+VERSION_SCRIPT := --version-script $(VERSION_SCRIPT)
+endif
EXTRA_LINK_OPTS:=$(VERSION_SCRIPT) -init __uClibc_init
EXTRA_LINK_LIBS:=$(libc_OUT)/misc/internals/interp.os $(top_builddir)lib/$(UCLIBC_LDSO) $(LIBGCC) # $(LDADD_LIBFLOAT)