svn commit: branches/uClibc-nptl: ldso/ldso ldso/libdl libc libcrypt libi etc...

carmelo at uclibc.org carmelo at uclibc.org
Sun Mar 16 08:51:36 UTC 2008


Author: carmelo
Date: 2008-03-16 01:51:34 -0700 (Sun, 16 Mar 2008)
New Revision: 21336

Log:
Merge nptl branch tree with trunk. 
Step 6: fix Makefiles to use $(VERSION) and the compiler-driver
for the link stage

Signed-off-by: Carmelo Amoroso <carmelo.amoroso at st.com>


Modified:
   branches/uClibc-nptl/Makefile.in
   branches/uClibc-nptl/ldso/ldso/Makefile.in
   branches/uClibc-nptl/ldso/libdl/Makefile.in
   branches/uClibc-nptl/libc/Makefile.in
   branches/uClibc-nptl/libcrypt/Makefile.in
   branches/uClibc-nptl/libintl/Makefile.in
   branches/uClibc-nptl/libm/Makefile.in
   branches/uClibc-nptl/libnsl/Makefile.in
   branches/uClibc-nptl/libpthread/linuxthreads.old/Makefile.in
   branches/uClibc-nptl/libpthread/linuxthreads.old_db/Makefile.in
   branches/uClibc-nptl/libpthread/linuxthreads/Makefile.in
   branches/uClibc-nptl/libpthread/linuxthreads_db/Makefile.in
   branches/uClibc-nptl/libresolv/Makefile.in
   branches/uClibc-nptl/librt/Makefile.in
   branches/uClibc-nptl/libutil/Makefile.in


Changeset:
Modified: branches/uClibc-nptl/Makefile.in
===================================================================
--- branches/uClibc-nptl/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -291,13 +291,13 @@
 install_runtime:
 ifeq ($(HAVE_SHARED),y)
 	$(INSTALL) -d $(PREFIX)$(RUNTIME_PREFIX)lib
-	$(INSTALL) -m 644 lib/lib*-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
+	$(INSTALL) -m 644 lib/lib*-$(VERSION).so \
 		$(PREFIX)$(RUNTIME_PREFIX)lib
 	cd lib && $(TAR) -cf - *.so.* | $(TAR) -xf - -C $(PREFIX)$(RUNTIME_PREFIX)lib
-	@if [ -x lib/$(UCLIBC_LDSO_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so ] ; then \
+	@if [ -x lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so ] ; then \
 		set -e; \
 		$(SHELL_SET_X); \
-		$(INSTALL) -m 755 lib/$(UCLIBC_LDSO_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so \
+		$(INSTALL) -m 755 lib/$(UCLIBC_LDSO_NAME)-$(VERSION).so \
 			$(PREFIX)$(RUNTIME_PREFIX)lib; \
 	fi
 endif

Modified: branches/uClibc-nptl/ldso/ldso/Makefile.in
===================================================================
--- branches/uClibc-nptl/ldso/ldso/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/ldso/ldso/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -27,11 +27,11 @@
 ifneq ($(SUPPORT_LD_DEBUG),y)
 LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS)
 else
-LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -z defs
+LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs
 endif
-LDFLAGS-$(UCLIBC_LDSO_NAME).so += -e _start -z now -Bsymbolic --export-dynamic --sort-common --discard-locals --discard-all --no-undefined
+LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,_start -Wl,-z,now -Wl,-Bsymbolic -Wl,--export-dynamic -Wl,--sort-common -Wl,--discard-locals -Wl,--discard-all -Wl,--no-undefined
 
-ldso_FULL_NAME := $(UCLIBC_LDSO_NAME)-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+ldso_FULL_NAME := $(UCLIBC_LDSO_NAME)-$(VERSION).so
 
 $(UCLIBC_LDSO_NAME)_DIR := $(top_srcdir)ldso/ldso
 $(UCLIBC_LDSO_NAME)_OUT := $(top_builddir)ldso/ldso

Modified: branches/uClibc-nptl/ldso/libdl/Makefile.in
===================================================================
--- branches/uClibc-nptl/ldso/libdl/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/ldso/libdl/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -13,11 +13,11 @@
 
 CFLAGS-libdl.c := -DLDSO_ELFINTERP=\"$(TARGET_ARCH)/elfinterp.c\"
 
-LDFLAGS-libdl.so := $(LDFLAGS) -fini dl_cleanup
+LDFLAGS-libdl.so := $(LDFLAGS) -Wl,-fini,dl_cleanup
 
 LIBS-libdl.so := $(LIBS) $(ldso)
 
-libdl_FULL_NAME := libdl-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libdl_FULL_NAME := libdl-$(VERSION).so
 
 libdl_DIR := $(top_srcdir)ldso/libdl
 libdl_OUT := $(top_builddir)ldso/libdl

Modified: branches/uClibc-nptl/libc/Makefile.in
===================================================================
--- branches/uClibc-nptl/libc/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libc/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -12,17 +12,17 @@
 # libc, and if so, include it when linking.
 VERSION_SCRIPT := $(wildcard $(libc_DIR)/sysdeps/linux/$(TARGET_ARCH)/libc.map)
 ifneq ($(VERSION_SCRIPT),)
-VERSION_SCRIPT := --version-script $(VERSION_SCRIPT)
+VERSION_SCRIPT := -Wl,--version-script,$(VERSION_SCRIPT)
 endif
 
-LDFLAGS-libc.so := $(LDFLAGS) $(VERSION_SCRIPT) -init __uClibc_init
+LDFLAGS-libc.so := $(LDFLAGS) $(VERSION_SCRIPT) -Wl,-init,$(SYMBOL_PREFIX)__uClibc_init
 ifeq ($(UCLIBC_HAS_STDIO_FUTEXES),y)
 CFLAGS += -D__USE_STDIO_FUTEXES__
 endif
 LIBS-libc.so := $(interp) $(ldso) $(top_builddir)lib/$(NONSHARED_LIBNAME)
 
 # we have SHARED_MAJORNAME=libc.so.$(MAJOR_VERSION) defined in Rules.mak
-libc_FULL_NAME := libuClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libc_FULL_NAME := libuClibc-$(VERSION).so
 
 # this comes first, so duplicate removal works correctly
 include $(libc_DIR)/sysdeps/Makefile.in
@@ -56,6 +56,8 @@
 lib-so-y += $(libc)
 objclean-y += libc_clean
 
+OUTPUT_FORMAT = $(CC) $(CFLAGS) -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/OUTPUT_FORMAT ( \1 )/p'
+
 ifeq ($(DOMULTI),n)
 $(libc:.$(MAJOR_VERSION)=): $(libc_OUT)/libc_so.a $(LIBS-libc.so)
 	$(call link.so,$(libc_FULL_NAME),$(MAJOR_VERSION))
@@ -66,6 +68,7 @@
 endif
 	$(Q)$(RM) $@
 	$(Q)cp $(top_srcdir)extra/scripts/format.lds $@
+	$(Q)echo "$(shell $(OUTPUT_FORMAT))" >> $@
 ifeq ($(COMPAT_ATEXIT),y)
 	$(Q)echo "GROUP ( $(NONSHARED_LIBNAME) $(SHARED_MAJORNAME) $(ASNEEDED) )" >> $@
 else
@@ -92,8 +95,11 @@
 	$(do_strip)
 	$(do_ar)
 
-$(top_builddir)lib/libc.gdb: $(top_builddir)lib/libc.a $(LINK_FLAT_CRTS)
-	$(call link-flat.so,$(@:.gdb=),$(SHARED_FLAT_ID))
+# We use libc_so.a so that we can compile the shared library with special
+# flags - i.e. -mleaf-id-shared-library.  The static libc.a needs to be
+# compiled without it.
+$(top_builddir)lib/libc.gdb: $(libc_OUT)/libc_so.a $(LINK_FLAT_CRTS)
+	$(call link-flat.so,$(@:.gdb=),$(UCLIBC_SHARED_FLAT_ID))
 
 libc_clean:
 	$(RM) $(libc_OUT)/*.{o,os,oS,a}

Modified: branches/uClibc-nptl/libcrypt/Makefile.in
===================================================================
--- branches/uClibc-nptl/libcrypt/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libcrypt/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -11,7 +11,7 @@
 
 LIBS-libcrypt.so := $(LIBS)
 
-libcrypt_FULL_NAME := libcrypt-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libcrypt_FULL_NAME := libcrypt-$(VERSION).so
 
 libcrypt_DIR := $(top_srcdir)libcrypt
 libcrypt_OUT := $(top_builddir)libcrypt

Modified: branches/uClibc-nptl/libintl/Makefile.in
===================================================================
--- branches/uClibc-nptl/libintl/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libintl/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -11,7 +11,7 @@
 
 LIBS-libintl.so := $(LIBS)
 
-libintl_FULL_NAME := libintl-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libintl_FULL_NAME := libintl-$(VERSION).so
 
 MOBJ := \
 	gettext.o ngettext.o  dgettext.o dcgettext.o dngettext.o dcngettext.o \

Modified: branches/uClibc-nptl/libm/Makefile.in
===================================================================
--- branches/uClibc-nptl/libm/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libm/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -27,7 +27,7 @@
 
 LIBS-libm.so := $(LIBS)
 
-libm_FULL_NAME := libm-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libm_FULL_NAME := libm-$(VERSION).so
 
 libm_ARCH_DIR:=$(top_srcdir)libm/$(TARGET_ARCH)
 libm_ARCH_OUT:=$(top_builddir)libm/$(TARGET_ARCH)

Modified: branches/uClibc-nptl/libnsl/Makefile.in
===================================================================
--- branches/uClibc-nptl/libnsl/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libnsl/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -11,7 +11,7 @@
 
 LIBS-libnsl.so := $(LIBS)
 
-libnsl_FULL_NAME := libnsl-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libnsl_FULL_NAME := libnsl-$(VERSION).so
 
 libnsl_DIR := $(top_srcdir)libnsl
 libnsl_OUT := $(top_builddir)libnsl

Modified: branches/uClibc-nptl/libpthread/linuxthreads/Makefile.in
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libpthread/linuxthreads/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -19,7 +19,7 @@
 #CFLAGS:=$(CFLAGS:-O0=-O1)
 
 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
-LDFLAGS-libpthread.so := $(LDFLAGS_NOSTRIP) -z defs
+LDFLAGS-libpthread.so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs
 else
 LDFLAGS-libpthread.so := $(LDFLAGS)
 endif
@@ -29,7 +29,7 @@
 START_FILE-libpthread.so := $(SHARED_START_FILES)
 END_FILE-libpthread.so := $(SHARED_END_FILES)
 
-libpthread_FULL_NAME := libpthread-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libpthread_FULL_NAME := libpthread-$(VERSION).so
 
 libpthread_DIR := $(top_srcdir)libpthread/linuxthreads
 libpthread_OUT := $(top_builddir)libpthread/linuxthreads

Modified: branches/uClibc-nptl/libpthread/linuxthreads.old/Makefile.in
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -12,7 +12,7 @@
 CFLAGS-libpthread/linuxthreads.old/sysdeps/$(TARGET_ARCH)/ := $(CFLAGS-linuxthreads.old)
 
 ifeq ($(PTHREADS_DEBUG_SUPPORT),y)
-LDFLAGS-libpthread.so := $(LDFLAGS_NOSTRIP) -z defs
+LDFLAGS-libpthread.so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs
 else
 LDFLAGS-libpthread.so := $(LDFLAGS)
 endif
@@ -22,7 +22,7 @@
 START_FILE-libpthread.so := $(SHARED_START_FILES)
 END_FILE-libpthread.so := $(SHARED_END_FILES)
 
-libpthread_FULL_NAME := libpthread-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libpthread_FULL_NAME := libpthread-$(VERSION).so
 
 libpthread_DIR := $(top_srcdir)libpthread/linuxthreads.old
 libpthread_OUT := $(top_builddir)libpthread/linuxthreads.old

Modified: branches/uClibc-nptl/libpthread/linuxthreads.old_db/Makefile.in
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads.old_db/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libpthread/linuxthreads.old_db/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -8,14 +8,14 @@
 # Get the thread include dependencies and shared object name
 CFLAGS-linuxthreads.old_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
 
-LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(call check_ld,--warn-unresolved-symbols)
+LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols)
 ifeq ($(DOSTRIP),y)
-LDFLAGS-libthread_db.so += -s
+LDFLAGS-libthread_db.so += -Wl,-s
 endif
 
 LIBS-libthread_db.so := $(LIBS)
 
-libthread_db_FULL_NAME := libthread_db-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libthread_db_FULL_NAME := libthread_db-$(VERSION).so
 
 libthread_db_DIR := $(top_srcdir)libpthread/linuxthreads.old_db
 libthread_db_OUT := $(top_builddir)libpthread/linuxthreads.old_db

Modified: branches/uClibc-nptl/libpthread/linuxthreads_db/Makefile.in
===================================================================
--- branches/uClibc-nptl/libpthread/linuxthreads_db/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libpthread/linuxthreads_db/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -8,14 +8,14 @@
 # Get the thread include dependencies and shared object name
 CFLAGS-linuxthreads_db := -DNOT_IN_libc -DLIBPTHREAD_SO="\"libpthread.so.$(MAJOR_VERSION)\""
 
-LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(call check_ld,--warn-unresolved-symbols)
+LDFLAGS-libthread_db.so := $(LDFLAGS_NOSTRIP) $(if $(call check_ld,--warn-unresolved-symbols),-Wl$(comma)--warn-unresolved-symbols)
 ifeq ($(DOSTRIP),y)
-LDFLAGS-libthread_db.so += -s
+LDFLAGS-libthread_db.so += -Wl,-s
 endif
 
 LIBS-libthread_db.so := $(LIBS)
 
-libthread_db_FULL_NAME := libthread_db-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libthread_db_FULL_NAME := libthread_db-$(VERSION).so
 
 libthread_db_DIR := $(top_srcdir)libpthread/linuxthreads_db
 libthread_db_OUT := $(top_builddir)libpthread/linuxthreads_db

Modified: branches/uClibc-nptl/libresolv/Makefile.in
===================================================================
--- branches/uClibc-nptl/libresolv/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libresolv/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -11,7 +11,7 @@
 
 LIBS-libresolv.so := $(LIBS)
 
-libresolv_FULL_NAME := libresolv-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libresolv_FULL_NAME := libresolv-$(VERSION).so
 
 libresolv_DIR := $(top_srcdir)libresolv
 libresolv_OUT := $(top_builddir)libresolv

Modified: branches/uClibc-nptl/librt/Makefile.in
===================================================================
--- branches/uClibc-nptl/librt/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/librt/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -16,7 +16,7 @@
 
 LIBS-librt.so := $(LIBS)
 
-librt_FULL_NAME := librt-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+librt_FULL_NAME := librt-$(VERSION).so
 
 librt_DIR := $(top_srcdir)librt
 librt_OUT := $(top_builddir)librt

Modified: branches/uClibc-nptl/libutil/Makefile.in
===================================================================
--- branches/uClibc-nptl/libutil/Makefile.in	2008-03-16 07:49:24 UTC (rev 21335)
+++ branches/uClibc-nptl/libutil/Makefile.in	2008-03-16 08:51:34 UTC (rev 21336)
@@ -11,7 +11,7 @@
 
 LIBS-libutil.so := $(LIBS)
 
-libutil_FULL_NAME := libutil-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
+libutil_FULL_NAME := libutil-$(VERSION).so
 
 libutil_DIR := $(top_srcdir)libutil
 libutil_OUT := $(top_builddir)libutil




More information about the uClibc-cvs mailing list