summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-12-08 11:25:52 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-12-08 11:26:01 +0100
commit3b02f78300e1addd7dde596ddce830d42e718e52 (patch)
tree3ffae98675177470bff19d71f0a995446ac49dec
parent712e333d57c7915e88505e20cdd4217818cd5c01 (diff)
downloadOSELAS.Toolchain-3b02f78300e1addd7dde596ddce830d42e718e52.tar.gz
glibc: only create libc.a ld script for glibc versions that need it
For newer glibc version (at least >= 2.16) this ld script is broken because libnss_*.a do not exist anymore. The code is now part of libc.a Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--rules/glibc.make12
1 files changed, 7 insertions, 5 deletions
diff --git a/rules/glibc.make b/rules/glibc.make
index 470b84d..0d7a4bf 100644
--- a/rules/glibc.make
+++ b/rules/glibc.make
@@ -157,11 +157,13 @@ $(STATEDIR)/glibc.install:
# Fix a bug when linking statically
# see: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=76451
#
- mv -- "$(SYSROOT)/usr/lib/libc.a" "$(SYSROOT)/usr/lib/libc_ns.a"
- echo '/* GNU ld script' > "$(SYSROOT)/usr/lib/libc.a"
- echo ' Use the static library, but some functions are in other strange' >> "$(SYSROOT)/usr/lib/libc.a"
- echo ' libraries :-( So try them secondarily. */' >> "$(SYSROOT)/usr/lib/libc.a"
- echo 'GROUP ( /usr/lib/libc_ns.a /usr/lib/libnss_files.a /usr/lib/libnss_dns.a /usr/lib/libresolv.a )' >> "$(SYSROOT)/usr/lib/libc.a"
+ if [ -e "$(SYSROOT)/usr/lib/libnss_files.a" ]; then \
+ mv -- "$(SYSROOT)/usr/lib/libc.a" "$(SYSROOT)/usr/lib/libc_ns.a" && \
+ echo '/* GNU ld script' > "$(SYSROOT)/usr/lib/libc.a" && \
+ echo ' Use the static library, but some functions are in other strange' >> "$(SYSROOT)/usr/lib/libc.a" && \
+ echo ' libraries :-( So try them secondarily. */' >> "$(SYSROOT)/usr/lib/libc.a" && \
+ echo 'GROUP ( /usr/lib/libc_ns.a /usr/lib/libnss_files.a /usr/lib/libnss_dns.a /usr/lib/libresolv.a )' >> "$(SYSROOT)/usr/lib/libc.a" ; \
+ fi
@$(call touch)