Accepting request 116361 from Base:System

Fix name of dynamic linker for ARMv5 (forwarded request 116358 from a_jaeger)

OBS-URL: https://build.opensuse.org/request/show/116361
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/glibc?expand=0&rev=107
This commit is contained in:
Stephan Kulow 2012-05-08 04:45:24 +00:00 committed by Git OBS Bridge
commit 1709bbba5d
3 changed files with 57 additions and 4 deletions

25
glibc-2.16-mcheck.patch Normal file
View File

@ -0,0 +1,25 @@
diff --git a/malloc/mcheck.c b/malloc/mcheck.c
index 9213740..7491c49 100644
--- a/malloc/mcheck.c
+++ b/malloc/mcheck.c
@@ -370,6 +370,12 @@ mabort (enum mcheck_status status)
#endif
}
+#ifndef malloc_opt_barrier
+#define malloc_opt_barrier(x) \
+({ __typeof (x) __x = x; __asm ("" : "+m" (__x)); __x; })
+#define malloc_force_eval(x) __asm __volatile ("" : : "m" (x))
+#endif
+
int
mcheck (func)
void (*func) (enum mcheck_status);
@@ -381,6 +387,7 @@ mcheck (func)
{
/* We call malloc() once here to ensure it is initialized. */
void *p = malloc (0);
+ p = malloc_opt_barrier (p);
free (p);
old_free_hook = __free_hook;

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Thu May 3 11:05:36 UTC 2012 - aj@suse.de
- Fix dynamic linker name for ARMv5.
-------------------------------------------------------------------
Thu Apr 26 14:02:37 UTC 2012 - aj@suse.de
- Fix mcheck (optimization problem with gcc 4.7)
-------------------------------------------------------------------
Wed Apr 25 10:40:20 UTC 2012 - aj@suse.de
- Also check for armv7hl.
-------------------------------------------------------------------
Wed Apr 25 08:47:22 UTC 2012 - adrian@suse.de
- provide old ld-linux.so.3 on armv7, not catched by find.provides
-------------------------------------------------------------------
Sun Apr 22 11:35:05 UTC 2012 - aj@suse.de

View File

@ -108,6 +108,11 @@ Obsoletes: glibc-64bit
%ifarch ppc
Obsoletes: glibc-32bit
%endif
%ifarch armv7l armv7hl
# The old runtime linker link gets not provided by rpm find.provides, but it exists
Provides: ld-linux.so.3
Provides: ld-linux.so.3(GLIBC_2.4)
%endif
Version: 2.15
Release: 0
%define git_id 2ba92745c36e
@ -292,6 +297,8 @@ Patch2007: glibc-sw13618-2.patch
Patch2008: glibc-ld-profile.patch
# PATCH-FIX-OPENSUSE _fini does not have proper unwinding information on x86_64 bso#11610
Patch2009: glibc-fini-unwind.diff
# PATCH-FIX-OPENSUSE malloc(0);free gets optimized out
Patch2010: glibc-2.16-mcheck.patch
%description
The GNU C Library provides the most important standard libraries used
@ -541,7 +548,7 @@ rm nscd/s-stamp
%endif
%patch2001 -p1
%ifarch armv7l
%ifarch armv7l armv7hl
%patch2002 -p1
%endif
%patch2003 -p1
@ -553,6 +560,7 @@ rm nscd/s-stamp
# XXX Disable, it breaks the testsuite, test elf/tst-audit2
# %patch2008 -p1
%patch2009 -p1
%patch2010 -p1
#
# Inconsistency detected by ld.so: dl-close.c: 719: _dl_close: Assertion `map->l_init_called' failed!
@ -1019,7 +1027,7 @@ mkdir -p %{buildroot}/lib/systemd/system
install -m 644 %{SOURCE21} %{buildroot}/lib/systemd/system
install -m 644 %{SOURCE22} %{buildroot}/lib/systemd/system
%ifarch armv7l
%ifarch armv7l armv7hl
# Provide compatibility link
ln -s ld-%{version}.so %{buildroot}/lib/ld-linux.so.3
%endif
@ -1099,12 +1107,12 @@ exit 0
# Each architecture has a different name for the dynamic linker:
%ifarch %arm
%ifarch armv7l
%ifarch armv7l armv7hl
/%{_lib}/ld-linux-armhf.so.3
# Keep compatibility link
/%{_lib}/ld-linux.so.3
%else
/%{_lib}/ld-linux.so.2
/%{_lib}/ld-linux.so.3
%endif
%endif
%ifarch ia64