[uclibc-ng-devel] uClibc-ng - small C library for embedded systems branch 1.0 updated. v1.0.1-86-g003946e

wbx wbx at helium.waldemar-brodkorb.de
Wed Apr 15 19:32:57 CEST 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "uClibc-ng - small C library for embedded systems".

The branch, 1.0 has been updated
       via  003946e5f5ad775ef64b72176018bf918899c5d3 (commit)
       via  c78cc48514723c9182a4fb5baa35bd59b8485cc7 (commit)
       via  03cc2041fc21889ca2256d0f1de76683bed4e94e (commit)
       via  efc26521e8c8cda6430efe9a8ed1b73896b655b5 (commit)
       via  a8cf23486eef67c359c295e8da3cb39cadf87f79 (commit)
       via  a68d786f309fa1ac5478b5b60d5b6fa0b5de7b7c (commit)
       via  19c4bf396ead620a84051102e7f0914200fcc5e0 (commit)
       via  04cd09eb3a4856e9dc31112170290e3baa3bf9fb (commit)
       via  1df50b08dfe4133d306156483a224f5a478f7dff (commit)
       via  f820f4ce071ae0985d84e09ea74dc42d55081e86 (commit)
       via  cf0234de47b019ac24e2d361d6386fdfad48f119 (commit)
       via  5fe8fc1ac4b5eb0f9e9bb01295c14b99d80ab41e (commit)
       via  e51d746b4b9ed54ddeed48d9e65ffd0811298c49 (commit)
       via  5f374c1fe85a1da95c15a5cac217f8ab762ce6dd (commit)
       via  3a14ea8812e8695b5205a70431d513fb905c0daf (commit)
      from  dd64f5afc19274f4e92afde3d13d1e8f0d2ee2d5 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 003946e5f5ad775ef64b72176018bf918899c5d3
Merge: dd64f5a c78cc48
Author: Waldemar Brodkorb <wbx at openadk.org>
Date:   Wed Apr 15 12:43:14 2015 -0500

    merge uClibc master

-----------------------------------------------------------------------

Summary of changes:
 Makerules                              |   13 ++-----------
 Rules.mak                              |   15 ++++++++++++---
 include/.gitignore                     |    1 +
 ldso/ldso/Makefile.in                  |   13 ++++---------
 libc/sysdeps/linux/arm/bits/syscalls.h |   25 ++++++++++++-------------
 librt/Makefile.in                      |   22 ++++++++++++----------
 librt/dso_handle.c                     |    5 +++++
 7 files changed, 48 insertions(+), 46 deletions(-)
 create mode 100644 librt/dso_handle.c

diff --git a/Makerules b/Makerules
index 10dc529..dd19cea 100644
--- a/Makerules
+++ b/Makerules
@@ -326,22 +326,13 @@ endef
 cmd_hcompile.u = $(HOSTCC) $(filter-out $(PHONY),$^) $(DEPS-$(notdir $@)) -o $@ $(BUILD_LDFLAGS) $(BUILD_LDFLAGS-$(notdir $(^D))) $(BUILD_LDFLAGS-$(notdir $@)) $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@))
 cmd_hcompile.o = $(HOSTCC) $(filter-out $(PHONY),$<) $(DEPS-$(notdir $@)) -c -o $@ $(BUILD_CFLAGS) $(BUILD_CFLAGS-$(notdir $(^D))) $(BUILD_CFLAGS-$(notdir $@))
 
-define create-lds
-	$(Q)$(RM) $@.lds
-	$(Q)$(CC) $(LDFLAG-fuse-ld) $(CPU_LDFLAGS-y) \
-	-nostdlib -nostartfiles -shared -Wl,-z,combreloc \
-	-Wl,-z,relro $(CFLAG_-Wl--hash-style=gnu) -Wl,-z,defs \
-	-x c /dev/null -Wl,--verbose 2>&1 | LC_ALL=C \
-	$(SED) -e '/^=========/,/^=========/!d;/^=========/d' \
-	-e 's/^\([ 	]*\)\. = .* + SIZEOF_HEADERS;/&\n\1$(SYMBOL_PREFIX)_begin = . - SIZEOF_HEADERS;/' > $@.lds
-endef
-
 define link.so
 	$(Q)$(RM) $@ $@.$(2) $(dir $@)$(1)
 	@$(disp_ld)
 	$(Q)$(CC) $(LDFLAGS-$(notdir $@)) $(LDFLAGS-y-$(@F)) \
 		-Wl,-soname=$(notdir $@).$(2) \
-		$(CFLAG_-nostdlib) -o $(dir $@)$(1) $(START_FILE-$(notdir $@)) \
+		$(CFLAG_-nostdlib) $(CFLAG_-nostartfiles) \
+		-o $(dir $@)$(1) $(START_FILE-$(notdir $@)) \
 		-Wl,--whole-archive $(firstword $^) -Wl,--no-whole-archive \
 		$(LIBS-$(notdir $@)) $(LIBGCC) $(END_FILE-$(notdir $@))
 	$(Q)$(LN) -sf $(1) $@.$(2)
diff --git a/Rules.mak b/Rules.mak
index 77ca3cc..a27929e 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -252,6 +252,7 @@ ARFLAGS:=cr
 
 # Note: The check for -nostdlib has to be before all calls to check_ld
 $(eval $(call check-gcc-var,-nostdlib))
+$(eval $(call check-gcc-var,-nostartfiles))
 # deliberately not named CFLAG-fuse-ld since unchecked and from user
 LDFLAG-fuse-ld := $(filter -fuse-ld=%,$(call qstrip,$(UCLIBC_EXTRA_CFLAGS)))
 # failed to merge target specific data of file /dev/null
@@ -663,14 +664,18 @@ LDFLAGS_NOSTRIP += $(CFLAG_-Wl--hash-style=gnu)
 endif
 endif
 
-LDFLAGS:=$(LDFLAGS_NOSTRIP) -Wl,-z,defs
 ifeq ($(DODEBUG),y)
 CFLAGS += -O0 -g3 -DDEBUG
 else
 CFLAGS += $(OPTIMIZATION)
 CFLAGS += $(OPTIMIZATION-$(GCC_MAJOR_VER))
 CFLAGS += $(OPTIMIZATION-$(GCC_MAJOR_VER).$(GCC_MINOR_VER))
+$(eval $(call check-ld-var,-O2))
+LDFLAGS_NOSTRIP += $(CFLAG_-Wl-O2)
 endif
+
+LDFLAGS:=$(LDFLAGS_NOSTRIP) -Wl,-z,defs
+
 ifeq ($(DOSTRIP),y)
 LDFLAGS += -Wl,-s
 else
@@ -784,8 +789,12 @@ endif
 ASFLAGS += $(ASFLAG_--noexecstack)
 
 LIBGCC_CFLAGS ?= $(CFLAGS) $(CPU_CFLAGS-y)
-$(eval $(call cache-output-var,LIBGCC,$(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name))
-LIBGCC_DIR:=$(dir $(LIBGCC))
+$(eval $(call cache-output-var,LIBGCC_A,$(CC) $(LIBGCC_CFLAGS) -print-libgcc-file-name))
+$(eval $(call cache-output-var,LIBGCC_EH,$(CC) $(LIBGCC_CFLAGS) -print-file-name=libgcc_eh.a))
+# with -O0 we (e.g. lockf) might end up with references to
+# _Unwind_Resume, so pull in gcc_eh in this case..
+LIBGCC_DIR := $(dir $(LIBGCC_A))
+LIBGCC := $(LIBGCC_A) $(if $(DODEBUG),$(LIBGCC_EH))
 
 # moved from libpthread/linuxthreads
 ifeq ($(UCLIBC_CTOR_DTOR),y)
diff --git a/include/.gitignore b/include/.gitignore
index 636f8ee..8f86c4c 100644
--- a/include/.gitignore
+++ b/include/.gitignore
@@ -38,6 +38,7 @@
 /sys/prctl.h
 /sys/procfs.h
 /sys/ptrace.h
+/sys/random.h
 /sys/reg.h
 /sys/regdef.h
 /sys/signalfd.h
diff --git a/ldso/ldso/Makefile.in b/ldso/ldso/Makefile.in
index a0ae7b3..424131c 100644
--- a/ldso/ldso/Makefile.in
+++ b/ldso/ldso/Makefile.in
@@ -38,10 +38,13 @@ LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS)
 else
 LDFLAGS-$(UCLIBC_LDSO_NAME).so := $(LDFLAGS_NOSTRIP) -Wl,-z,defs
 endif
-LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,$(SYMBOL_PREFIX)_start -Wl,-z,now -Wl,-Bsymbolic \
+LDFLAGS-$(UCLIBC_LDSO_NAME).so += -Wl,-e,$(SYMBOL_PREFIX)_start \
+	-Wl,-z,now -Wl,-Bsymbolic \
 	-Wl,--export-dynamic $(CFLAG_-Wl--sort-common) -Wl,--discard-locals \
 	$(CFLAG_-Wl--discard-all) -Wl,--no-undefined
 
+LDFLAGS-$(LDSO_PRELINK_SUPPORT)-$(UCLIBC_LDSO_NAME).so += -Wl,-defsym=$(SYMBOL_PREFIX)_begin=0
+
 ldso_FULL_NAME := $(UCLIBC_LDSO_NAME)-$(VERSION).so
 
 $(UCLIBC_LDSO_NAME)_DIR := $(top_srcdir)ldso/ldso
@@ -67,17 +70,9 @@ ldso-y := $($(UCLIBC_LDSO_NAME)_OBJS:.o=.oS)
 lib-so-y += $(ldso)
 objclean-y += CLEAN_ldso/ldso
 
-ifeq ($(LDSO_PRELINK_SUPPORT),y)
-# Use a specific linker script for ld.so
-LDFLAGS-$(UCLIBC_LDSO_NAME).so += -T $(ldso:.$(ABI_VERSION)=).lds
-endif
-
 $(ldso): $(ldso:.$(ABI_VERSION)=)
 $(ldso:.$(ABI_VERSION)=): | $(top_builddir)lib
 $(ldso:.$(ABI_VERSION)=): $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a
-ifeq ($(LDSO_PRELINK_SUPPORT),y)
-	$(call create-lds)
-endif
 	$(call link.so,$(ldso_FULL_NAME),$(ABI_VERSION))
 
 $($(UCLIBC_LDSO_NAME)_OUT)/$(UCLIBC_LDSO_NAME)_so.a: $(ldso-y)
diff --git a/libc/sysdeps/linux/arm/bits/syscalls.h b/libc/sysdeps/linux/arm/bits/syscalls.h
index 778cc34..e447a7b 100644
--- a/libc/sysdeps/linux/arm/bits/syscalls.h
+++ b/libc/sysdeps/linux/arm/bits/syscalls.h
@@ -53,15 +53,15 @@
     {									\
       int _sys_buf[2];							\
       register int __a1 __asm__ ("a1");					\
-      register int *_v3 __asm__ ("v3") = _sys_buf;			\
-      *_v3 = (int) (name);						\
+      register int *__v3 __asm__ ("v3") = _sys_buf;			\
+      *__v3 = (int) (name);						\
       LOAD_ARGS_##nr (args)						\
       __asm__ __volatile__ ("str	r7, [v3, #4]\n"			\
 		    "\tldr	r7, [v3]\n"				\
 		    "\tswi	0	@ syscall " #name "\n"		\
 		    "\tldr	r7, [v3, #4]"				\
 		    : "=r" (__a1)					\
-		    : "r" (_v3) ASM_ARGS_##nr				\
+		    : "r" (__v3) ASM_ARGS_##nr				\
                     : "memory");					\
 	__internal_sys_result = __a1;					\
     }									\
@@ -111,23 +111,22 @@
   register int __a4 __asm__ ("a4") = __a4tmp;
 #define ASM_ARGS_4	ASM_ARGS_3, "r" (__a4)
 #define LOAD_ARGS_5(a1, a2, a3, a4, a5)		\
-  int _v1tmp = (int) (a5);			\
+  int __v1tmp = (int) (a5);			\
   LOAD_ARGS_4 (a1, a2, a3, a4)			\
-  register int _v1 __asm__ ("v1") = _v1tmp;
-#define ASM_ARGS_5	ASM_ARGS_4, "r" (_v1)
+  register int __v1 __asm__ ("v1") = __v1tmp;
+#define ASM_ARGS_5	ASM_ARGS_4, "r" (__v1)
 #define LOAD_ARGS_6(a1, a2, a3, a4, a5, a6)	\
-  int _v2tmp = (int) (a6);			\
+  int __v2tmp = (int) (a6);			\
   LOAD_ARGS_5 (a1, a2, a3, a4, a5)		\
-  register int _v2 __asm__ ("v2") = _v2tmp;
-#define ASM_ARGS_6	ASM_ARGS_5, "r" (_v2)
+  register int __v2 __asm__ ("v2") = __v2tmp;
+#define ASM_ARGS_6	ASM_ARGS_5, "r" (__v2)
 #ifndef __thumb__
 #define LOAD_ARGS_7(a1, a2, a3, a4, a5, a6, a7)	\
-  int _v3tmp = (int) (a7);			\
+  int __v3tmp = (int) (a7);			\
   LOAD_ARGS_6 (a1, a2, a3, a4, a5, a6)		\
-  register int _v3 __asm__ ("v3") = _v3tmp;
-#define ASM_ARGS_7	ASM_ARGS_6, "r" (_v3)
+  register int __v3 __asm__ ("v3") = __v3tmp;
+#define ASM_ARGS_7	ASM_ARGS_6, "r" (__v3)
 #endif
 
-
 #endif /* __ASSEMBLER__ */
 #endif /* _BITS_SYSCALLS_H */
diff --git a/librt/Makefile.in b/librt/Makefile.in
index 1c1559c..1536a5c 100644
--- a/librt/Makefile.in
+++ b/librt/Makefile.in
@@ -13,19 +13,15 @@ LDFLAGS-$(UCLIBC_FORMAT_DSBT_ELF)-librt.so := -Wl,--dsbt-index=9
 LDFLAGS-librt.so := $(LDFLAGS)
 LIBS-librt.so := $(LIBS)
 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
-LIBS-librt.so += $(top_builddir)lib/libdl.so $(top_builddir)lib/libpthread.so
+LIBS-librt.so += $(top_builddir)lib/libpthread.so \
+	$(CC_FLAG_ASNEEDED) $(top_builddir)lib/libdl.so $(CC_FLAG_NO_ASNEEDED)
 endif
-START_FILE-librt.so := $(SHARED_START_FILES)
-END_FILE-librt.so := $(SHARED_END_FILES)
-
 
 librt_FULL_NAME := librt-$(VERSION).so
 
 librt_DIR := $(top_srcdir)librt
 librt_OUT := $(top_builddir)librt
 
-ifeq ($(UCLIBC_HAS_REALTIME),y)
-
 librt_SRC := $(notdir $(wildcard $(librt_DIR)/*.c))
 librt_filter_SRC :=
 ifeq ($(UCLIBC_HAS_THREADS_NATIVE),y)
@@ -45,8 +41,10 @@ librt_filter_SRC += $(if $(UCLIBC_HAS_ADVANCED_REALTIME),, \
 	spawn_faction_addopen.c \
 	spawn_faction_init.c)
 
-librt_SRC := $(filter-out $(librt_filter_SRC),$(librt_SRC))
+librt_filter_SRC += $(if $(UCLIBC_HAS_STUBS),,rt_stubs.c)
+librt_filter_SRC += $(if $(HAS_NO_THREADS),dso_handle.c)
 
+librt_SRC := $(filter-out $(librt_filter_SRC),$(librt_SRC))
 librt_OBJ := $(patsubst %.c,$(librt_OUT)/%.o,$(librt_SRC))
 librt_OBJ += $(patsubst $(librt_DIR)/%.S,$(librt_OUT)/%.o,$(librt_SSRC))
 
@@ -60,15 +58,19 @@ librt-a-y += $(librt_OBJ)
 endif
 librt-so-y += $(librt_OBJ:.o=.oS)
 
+ifeq ($(UCLIBC_HAS_REALTIME),y)
 lib-a-y += $(top_builddir)lib/librt.a
 lib-so-y += $(top_builddir)lib/librt.so
 endif
 
+librt-dep-y := $(libc.depend)
+librt-dep-$(UCLIBC_HAS_THREADS_NATIVE) += $(libpthread.depend) $(libdl.depend)
 
-ifeq ($(DOPIC)$(UCLIBC_HAS_THREADS_NATIVE),yn)
-$(top_builddir)lib/librt.so: $(top_builddir)lib/librt.a $(libc.depend)
+# for NPTL we need SHARED regardless of DOPIC
+ifeq ($(if $(UCLIBC_HAS_THREADS_NATIVE),,$(DOPIC)),y)
+$(top_builddir)lib/librt.so: $(top_builddir)lib/librt.a $(librt-dep-y)
 else
-$(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a $(libc.depend) $(libpthread.depend) $(libdl.depend)
+$(top_builddir)lib/librt.so: $(librt_OUT)/librt_so.a $(librt-dep-y)
 endif
 	$(call link.so,$(librt_FULL_NAME),$(ABI_VERSION))
 
diff --git a/librt/dso_handle.c b/librt/dso_handle.c
new file mode 100644
index 0000000..6339071
--- /dev/null
+++ b/librt/dso_handle.c
@@ -0,0 +1,5 @@
+/* Copyright (C) 2015 Bernhard Reutner-Fischer
+ * Licensed under the LGPL v2.1 or later, see the file COPYING.LIB in this tarball.
+ */
+
+const void *const __dso_handle attribute_hidden = &__dso_handle;


hooks/post-receive
-- 
uClibc-ng - small C library for embedded systems


More information about the devel mailing list