aboutsummaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32/uclibc-librt-asneeded-fix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/libc0.9.32/uclibc-librt-asneeded-fix.patch')
-rw-r--r--main/libc0.9.32/uclibc-librt-asneeded-fix.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/main/libc0.9.32/uclibc-librt-asneeded-fix.patch b/main/libc0.9.32/uclibc-librt-asneeded-fix.patch
new file mode 100644
index 0000000000..d85af19f2a
--- /dev/null
+++ b/main/libc0.9.32/uclibc-librt-asneeded-fix.patch
@@ -0,0 +1,39 @@
+--- uClibc-0.9.32-rc3.orig/Makefile.in
++++ uClibc-0.9.32-rc3/Makefile.in
+@@ -340,6 +340,12 @@
+ echo "GROUP ( $(UBACKTRACE_ASNEEDED) )" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
+ fi
+ endif
++ifeq ($(UCLIBC_HAS_REALTIME),y)
++# Add the AS_NEEDED entry for librt.so
++ if [ -f $(top_builddir)lib/libc.so -a -f $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so ] ; then \
++ echo "GROUP ( $(LIBRT_ASNEEDED) )" >> $(PREFIX)$(DEVEL_PREFIX)$(MULTILIB_DIR)/libc.so; \
++ fi
++endif
+ ifeq ($(UCLIBC_HAS_THREADS),y)
+ ifneq ($(LINUXTHREADS_OLD),y)
+ ifeq ($(HARDWIRED_ABSPATH),y)
+--- uClibc-0.9.32-rc3.orig/Rules.mak
++++ uClibc-0.9.32-rc3/Rules.mak
+@@ -119,6 +119,7 @@
+ LIBC := libc
+ SHARED_LIBNAME := $(LIBC).so.$(ABI_VERSION)
+ UBACKTRACE_DSO := libubacktrace.so.$(ABI_VERSION)
++LIBRT_DSO := librt.so.$(ABI_VERSION)
+ ifneq ($(findstring $(TARGET_ARCH) , hppa64 ia64 mips64 powerpc64 s390x sparc64 x86_64 ),)
+ UCLIBC_LDSO_NAME := ld64-uClibc
+ ARCH_NATIVE_BIT := 64
+@@ -542,6 +543,13 @@
+ export UBACKTRACE_ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(UBACKTRACE_FULL_NAME) )" || echo "$(UBACKTRACE_FULL_NAME)")
+ else
+ export UBACKTRACE_ASNEEDED:=""
++endif
++ifeq ($(UCLIBC_HAS_REALTIME),y)
++# Only used in installed libc.so linker script
++LIBRT_FULL_NAME := $(RUNTIME_PREFIX)lib/$(LIBRT_DSO)
++export LIBRT_ASNEEDED:=$(shell $(LD) --help 2>/dev/null | grep -q -- --as-needed && echo "AS_NEEDED ( $(LIBRT_FULL_NAME) )" || echo "$(LIBRT_FULL_NAME)")
++else
++export LIBRT_ASNEEDED:=""
+ endif
+ endif
+