From d874cc673a85fe328b37d59e84d7f7716417a7e5 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 13 Jan 2006 08:52:26 +0000 Subject: fix up ability to rename ldso --- Rules.mak | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'Rules.mak') diff --git a/Rules.mak b/Rules.mak index c46affa8b..41cc0c22b 100644 --- a/Rules.mak +++ b/Rules.mak @@ -49,6 +49,22 @@ BUILD_CFLAGS = -O2 -Wall # Nothing beyond this point should ever be touched by mere # mortals. Unless you hang out with the gods, you should # probably leave all this stuff alone. + +# Pull in the user's uClibc configuration +ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) +-include $(top_builddir).config +endif + +# Make certain these contain a final "/", but no "//"s. +TARGET_ARCH:=$(shell grep -s '^TARGET_ARCH' $(top_builddir)/.config | sed -e 's/^TARGET_ARCH=//' -e 's/"//g') +TARGET_ARCH:=$(strip $(subst ",, $(strip $(TARGET_ARCH)))) +RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(RUNTIME_PREFIX)))))) +DEVEL_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(DEVEL_PREFIX)))))) +KERNEL_SOURCE:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(KERNEL_SOURCE)))))) +export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_SOURCE + + +# Now config hard core MAJOR_VERSION := 0 MINOR_VERSION := 9 SUBLEVEL := 28 @@ -59,7 +75,11 @@ export MAJOR_VERSION MINOR_VERSION SUBLEVEL VERSION LC_ALL LIBC := libc SHARED_MAJORNAME := $(LIBC).so.$(MAJOR_VERSION) -UCLIBC_LDSO := ld-uClibc.so.$(MAJOR_VERSION) +UCLIBC_LDSO_NAME := ld-uClibc +ifeq ($(TARGET_ARCH),x86_64) +UCLIBC_LDSO_NAME := ld64-uClibc +endif +UCLIBC_LDSO := $(UCLIBC_LDSO_NAME).so.$(MAJOR_VERSION) NONSHARED_LIBNAME := uclibc_nonshared.a libc := $(top_builddir)lib/$(SHARED_MAJORNAME) interp := $(top_builddir)lib/interp.os @@ -75,11 +95,6 @@ ifndef PREFIX PREFIX = $(DESTDIR) endif -# Pull in the user's uClibc configuration -ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) --include $(top_builddir).config -endif - ifneq ($(HAVE_SHARED),y) libc := endif @@ -107,14 +122,6 @@ SECHO=-@false SHELL_SET_X=set +x endif -# Make certain these contain a final "/", but no "//"s. -TARGET_ARCH:=$(shell grep -s '^TARGET_ARCH' $(top_builddir)/.config | sed -e 's/^TARGET_ARCH=//' -e 's/"//g') -TARGET_ARCH:=$(strip $(subst ",, $(strip $(TARGET_ARCH)))) -RUNTIME_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(RUNTIME_PREFIX)))))) -DEVEL_PREFIX:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(DEVEL_PREFIX)))))) -KERNEL_SOURCE:=$(strip $(subst //,/, $(subst ,/, $(subst ",, $(strip $(KERNEL_SOURCE)))))) -export RUNTIME_PREFIX DEVEL_PREFIX KERNEL_SOURCE - ARFLAGS:=cr OPTIMIZATION:= @@ -253,10 +260,6 @@ ifeq ($(TARGET_ARCH),frv) UCLIBC_LDSO=ld.so.1 endif -ifeq ($(TARGET_ARCH),x86_64) - UCLIBC_LDSO := ld64-uClibc.so.$(MAJOR_VERSION) -endif - # Keep the check_gcc from being needlessly executed ifndef PIEFLAG ifneq ($(UCLIBC_BUILD_PIE),y) -- cgit v1.2.3