diff options
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | Makerules | 2 | ||||
-rw-r--r-- | Rules.mak | 39 | ||||
-rw-r--r-- | ldso/ldso/Makefile.in | 34 |
4 files changed, 41 insertions, 38 deletions
diff --git a/Makefile.in b/Makefile.in index 0ff94d808..6e56e0af8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -232,10 +232,10 @@ ifeq ($(HAVE_SHARED),y) $(INSTALL) -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \ $(PREFIX)$(RUNTIME_PREFIX)lib cp -dRf lib/*.so.* $(PREFIX)$(RUNTIME_PREFIX)lib - @if [ -x lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \ + @if [ -x lib/$(UCLIBC_LDSO_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \ set -e; \ $(SHELL_SET_X); \ - $(INSTALL) -m 755 lib/ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \ + $(INSTALL) -m 755 lib/$(UCLIBC_LDSO_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \ $(PREFIX)$(RUNTIME_PREFIX)lib; \ fi endif @@ -15,7 +15,7 @@ libs: $(lib-a-y) endif objs: all_objs -shared_objs = $(ld-uClibc-so-y) $(libc-so-y) $(libc-nonshared-y) $(libdl-so-y) +shared_objs = $(ldso-y) $(libc-so-y) $(libc-nonshared-y) $(libdl-so-y) shared_objs += $(libcrypt-so-y) $(libintl-so-y) $(libm-so-y) $(libnsl-so-y) $(libpthread-so-y) shared_objs += $(libthread_db-so-y) $(libresolv-so-y) $(librt-so-y) $(libutil-so-y) ar_objs = $(libc-a-y) $(libdl-a-y) $(libcrypt-a-y) $(libintl-a-y) $(libm-a-y) $(libnsl-a-y) @@ -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) diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in index c5273bcc8..054aa7891 100644 --- a/ldso/ldso/Makefile.in +++ b/ldso/ldso/Makefile.in @@ -33,37 +33,37 @@ CFLAGS-ldso/ldso/$(TARGET_ARCH)/ := $(CFLAGS-ldso) CFLAGS-ldso.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\" ifneq ($(SUPPORT_LD_DEBUG),y) -LDFLAGS-ld-uClibc.so := $(LDFLAGS) +LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS) else -LDFLAGS-ld-uClibc.so := $(LDFLAGS_NOSTRIP) -z defs +LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -z defs endif -LDFLAGS-ld-uClibc.so += -e _start -z now -Bsymbolic --export-dynamic --sort-common --discard-locals --discard-all --no-undefined +LDFLAGS-$(UCLIBC_LDSO_NAME).so += -e _start -z now -Bsymbolic --export-dynamic --sort-common --discard-locals --discard-all --no-undefined -ldso_FULL_NAME := ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so +ldso_FULL_NAME := $(UCLIBC_LDSO_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so -ld-uClibc_DIR := $(top_srcdir)ldso/ldso -ld-uClibc_OUT := $(top_builddir)ldso/ldso +$(UCLIBC_LDSO_NAME)_DIR := $(top_srcdir)ldso/ldso +$(UCLIBC_LDSO_NAME)_OUT := $(top_builddir)ldso/ldso -ld-uClibc_CSRC := $(ld-uClibc_DIR)/ldso.c -ld-uClibc_COBJ := $(patsubst $(ld-uClibc_DIR)/%.c,$(ld-uClibc_OUT)/%.o,$(ld-uClibc_CSRC)) +$(UCLIBC_LDSO_NAME)_CSRC := $($(UCLIBC_LDSO_NAME)_DIR)/ldso.c +$(UCLIBC_LDSO_NAME)_COBJ := $(patsubst $($(UCLIBC_LDSO_NAME)_DIR)/%.c,$($(UCLIBC_LDSO_NAME)_OUT)/%.o,$($(UCLIBC_LDSO_NAME)_CSRC)) -ld-uClibc_SSRC := $(wildcard $(ld-uClibc_DIR)/$(TARGET_ARCH)/*.S) -ld-uClibc_SOBJ := $(patsubst $(ld-uClibc_DIR)/$(TARGET_ARCH)/%.S,$(ld-uClibc_OUT)/$(TARGET_ARCH)/%.o,$(ld-uClibc_SSRC)) +$(UCLIBC_LDSO_NAME)_SSRC := $(wildcard $($(UCLIBC_LDSO_NAME)_DIR)/$(TARGET_ARCH)/*.S) +$(UCLIBC_LDSO_NAME)_SOBJ := $(patsubst $($(UCLIBC_LDSO_NAME)_DIR)/$(TARGET_ARCH)/%.S,$($(UCLIBC_LDSO_NAME)_OUT)/$(TARGET_ARCH)/%.o,$($(UCLIBC_LDSO_NAME)_SSRC)) -ld-uClibc_OBJS := $(ld-uClibc_COBJ) $(ld-uClibc_SOBJ) +$(UCLIBC_LDSO_NAME)_OBJS := $($(UCLIBC_LDSO_NAME)_COBJ) $($(UCLIBC_LDSO_NAME)_SOBJ) -ld-uClibc-so-y := $(ld-uClibc_OBJS:.o=.oS) +ldso-y := $($(UCLIBC_LDSO_NAME)_OBJS:.o=.oS) lib-so-y += $(ldso) -objclean-y += ld-uClibc_clean +objclean-y += $(UCLIBC_LDSO_NAME)_clean -$(ldso:.$(MAJOR_VERSION)=): $(ld-uClibc_OUT)/ld-uClibc_so.a +$(ldso:.$(MAJOR_VERSION)=): $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a $(call link.so,$(ldso_FULL_NAME),$(MAJOR_VERSION)) -$(ld-uClibc_OUT)/ld-uClibc_so.a: $(ld-uClibc-so-y) +$($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a: $(ldso-y) $(Q)$(RM) $@ $(do_strip) $(do_ar) -ld-uClibc_clean: - $(RM) $(ld-uClibc_OUT)/*.{o,os,oS,a} $(ld-uClibc_OUT)/*/*.{o,os} +$(UCLIBC_LDSO_NAME)_clean: + $(RM) $($(UCLIBC_LDSO_NAME)_OUT)/*.{o,os,oS,a} $($(UCLIBC_LDSO_NAME)_OUT)/*/*.{o,os} |