diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-05-04 22:29:43 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-05-04 22:29:43 +0000 |
commit | 91307a366625e3ec7e618f012269130d2e5bba57 (patch) | |
tree | 9174f2733dd20ff6cd4b25d0038bdccf268e519f /Rules.mak | |
parent | ae9bb92ccc2b4a9a75b09c59e1351a78e6a6da53 (diff) |
This patch allows powerpc to compile again. It also checks if we
are compiling for an arch for which uClibc has an ld.so or not,
and otherwise sets things up to use the system ld.so.
-Erik
Diffstat (limited to 'Rules.mak')
-rw-r--r-- | Rules.mak | 19 |
1 files changed, 18 insertions, 1 deletions
@@ -30,6 +30,7 @@ MINOR_VERSION=9.5 LIBNAME=libc.a SHARED_FULLNAME=uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so SHARED_MAJORNAME=libc.so.$(MAJOR_VERSION) +UCLIBC_LDSO=ld-linux-uclibc.so.$(MAJOR_VERSION) BUILDTIME = $(shell TZ=UTC date --utc "+%Y.%m.%d-%H:%M%z") @@ -60,7 +61,23 @@ ifndef $(PREFIX) PREFIX = `pwd`/_install endif -NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/') +NATIVE_ARCH = $(shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/g') + +LDSO_PRESENT=$(strip $(shell cd $(TOPDIR)/ld.so-1/d-link; ls -d $(TARGET_ARCH) 2>/dev/null)) + +ifeq ($(NATIVE_ARCH), $(TARGET_ARCH)) + SYSTEM_LDSO=$(shell ldd `which $(CC)` | sed -ne /ld/p | sed -e s/\ =.*//g) +else + SYSTEM_LDSO=/lib/ld-linux.so.2 +endif + +ifeq ($(LDSO_PRESENT), $(TARGET_ARCH)) + LDSO=ld.so-1/d-link/$(UCLIBC_LDSO) +else + LDSO=$(SYSTEM_LDSO) +endif + + # It turns out the currently, function-sections causes ldelf2flt to segfault. # So till further notice, this is disabled by default.... |