SHA256
1
0
forked from pool/glibc

Accepting request 71335 from home:a_jaeger:branches:openSUSE:Factory

Tune configure

OBS-URL: https://build.opensuse.org/request/show/71335
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=53
This commit is contained in:
Andreas Jaeger 2011-05-25 19:08:25 +00:00 committed by Git OBS Bridge
parent da7657d9de
commit 9aff35bbd4
5 changed files with 132 additions and 23 deletions

27
glibc-bso-12454.diff Normal file
View File

@ -0,0 +1,27 @@
2011-03-02 Andreas Schwab <schwab@redhat.com>
[BZ #12454]
* elf/dl-deps.c (_dl_map_object_deps): Don't try to sort
dependencies when there are none.
--- a/elf/dl-deps.c.orig 2011-05-25 16:42:39.000000000 +0200
+++ a/elf/dl-deps.c 2011-05-25 16:44:07.000000000 +0200
@@ -619,7 +619,8 @@
/* We can skip looking for the binary itself which is at the front
of the search list. */
- assert (nlist > 1);
+ if (nlist > 1)
+ {
i = 1;
bool seen[nlist];
memset (seen, false, nlist * sizeof (seen[0]));
@@ -669,7 +670,7 @@
next:;
}
-
+ }
/* Terminate the list of dependencies. */
l_initfini[nlist] = NULL;
atomic_write_barrier ();

View File

@ -0,0 +1,45 @@
Index: glibc-2.13/sysdeps/x86_64/multiarch/Makefile
===================================================================
--- glibc-2.13.orig/sysdeps/x86_64/multiarch/Makefile
+++ glibc-2.13/sysdeps/x86_64/multiarch/Makefile
@@ -6,7 +6,7 @@ endif
ifeq ($(subdir),string)
sysdep_routines += stpncpy-c strncpy-c strcmp-ssse3 strncmp-ssse3 \
strend-sse4 memcmp-sse4 memcpy-ssse3 mempcpy-ssse3 \
- memmove-ssse3 memcpy-ssse3-back mempcpy-ssse3-back \
+ memmove-ssse3 mempcpy-ssse3-back \
memmove-ssse3-back strcasestr-nonascii strcasecmp_l-ssse3 \
strncase_l-ssse3 strlen-sse4 strlen-no-bsf \
memset-x86-64
Index: glibc-2.13/sysdeps/x86_64/multiarch/memcpy.S
===================================================================
--- glibc-2.13.orig/sysdeps/x86_64/multiarch/memcpy.S
+++ glibc-2.13/sysdeps/x86_64/multiarch/memcpy.S
@@ -35,9 +35,11 @@ ENTRY(memcpy)
testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
jz 2f
leaq __memcpy_ssse3(%rip), %rax
+ /* disable backward memcpy for glibc 2.13
testl $bit_Fast_Copy_Backward, __cpu_features+FEATURE_OFFSET+index_Fast_Copy_Backward(%rip)
jz 2f
leaq __memcpy_ssse3_back(%rip), %rax
+ */
2: ret
END(memcpy)
Index: glibc-2.13/sysdeps/x86_64/multiarch/memcpy_chk.S
===================================================================
--- glibc-2.13.orig/sysdeps/x86_64/multiarch/memcpy_chk.S
+++ glibc-2.13/sysdeps/x86_64/multiarch/memcpy_chk.S
@@ -36,9 +36,11 @@ ENTRY(__memcpy_chk)
testl $bit_SSSE3, __cpu_features+CPUID_OFFSET+index_SSSE3(%rip)
jz 2f
leaq __memcpy_chk_ssse3(%rip), %rax
+ /* disable backwards memcpy until glibc 2.14
testl $bit_Fast_Copy_Backward, __cpu_features+FEATURE_OFFSET+index_Fast_Copy_Backward(%rip)
jz 2f
leaq __memcpy_chk_ssse3_back(%rip), %rax
+ */
2: ret
END(__memcpy_chk)
# else

View File

@ -37,11 +37,11 @@ in extremely thread-intensive applications.
PER_THREAD.
* malloc/malloc.c: Remove redundant M_* defines.
diff --git a/malloc/arena.c b/malloc/arena.c
index 4d0deef..ea80724 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -78,8 +78,8 @@ extern int sanity_check_heap_info_alignment[(sizeof (heap_info)
Index: glibc-2.13/malloc/arena.c
===================================================================
--- glibc-2.13.orig/malloc/arena.c
+++ glibc-2.13/malloc/arena.c
@@ -78,8 +78,8 @@ extern int sanity_check_heap_info_alignm
static tsd_key_t arena_key;
static mutex_t list_lock;
@ -83,15 +83,16 @@ index 4d0deef..ea80724 100644
(void)mutex_unlock(&list_lock);
#endif
@@ -982,13 +980,9 @@ get_free_list (void)
@@ -982,13 +980,10 @@ get_free_list (void)
return result;
}
-
-static mstate
-reused_arena (void)
+static int get_narenas_limit (void) __attribute__((pure));
+static int
+get_narenas_limit (void) __attribute__((pure))
+get_narenas_limit (void)
{
- if (narenas <= mp_.arena_test)
- return NULL;
@ -99,7 +100,7 @@ index 4d0deef..ea80724 100644
static int narenas_limit;
if (narenas_limit == 0)
{
@@ -1006,10 +1000,16 @@ reused_arena (void)
@@ -1006,10 +1001,16 @@ reused_arena (void)
narenas_limit = NARENAS_FROM_NCORES (2);
}
}
@ -118,7 +119,7 @@ index 4d0deef..ea80724 100644
mstate result;
static mstate next_to_use;
if (next_to_use == NULL)
@@ -1035,7 +1035,6 @@ reused_arena (void)
@@ -1035,7 +1036,6 @@ reused_arena (void)
return result;
}
@ -126,7 +127,7 @@ index 4d0deef..ea80724 100644
static mstate
internal_function
@@ -1048,10 +1047,15 @@ arena_get2(a_tsd, size) mstate a_tsd; size_t size;
@@ -1048,10 +1048,15 @@ arena_get2(a_tsd, size) mstate a_tsd; si
mstate a;
#ifdef PER_THREAD
@ -146,7 +147,7 @@ index 4d0deef..ea80724 100644
#else
if(!a_tsd)
a = a_tsd = &main_arena;
@@ -1093,8 +1097,14 @@ arena_get2(a_tsd, size) mstate a_tsd; size_t size;
@@ -1093,8 +1098,14 @@ arena_get2(a_tsd, size) mstate a_tsd; si
goto repeat;
}
@ -163,10 +164,10 @@ index 4d0deef..ea80724 100644
(void)mutex_unlock(&list_lock);
#endif
diff --git a/malloc/hooks.c b/malloc/hooks.c
index 28845ee..e938492 100644
--- a/malloc/hooks.c
+++ b/malloc/hooks.c
Index: glibc-2.13/malloc/hooks.c
===================================================================
--- glibc-2.13.orig/malloc/hooks.c
+++ glibc-2.13/malloc/hooks.c
@@ -579,9 +579,9 @@ public_gET_STATe(void)
ms->max_fast = get_max_fast();
#ifdef PER_THREAD
@ -189,11 +190,11 @@ index 28845ee..e938492 100644
}
check_malloc_state(&main_arena);
diff --git a/malloc/malloc.c b/malloc/malloc.c
index b1d43c6..8dbadfa 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -2406,9 +2406,10 @@ struct malloc_par {
Index: glibc-2.13/malloc/malloc.c
===================================================================
--- glibc-2.13.orig/malloc/malloc.c
+++ glibc-2.13/malloc/malloc.c
@@ -2405,9 +2405,10 @@ struct malloc_par {
INTERNAL_SIZE_T top_pad;
INTERNAL_SIZE_T mmap_threshold;
#ifdef PER_THREAD
@ -205,7 +206,7 @@ index b1d43c6..8dbadfa 100644
/* Memory map support */
int n_mmaps;
@@ -2446,13 +2447,6 @@ static struct malloc_state main_arena;
@@ -2445,13 +2446,6 @@ static struct malloc_state main_arena;
static struct malloc_par mp_;
@ -219,7 +220,7 @@ index b1d43c6..8dbadfa 100644
/* Maximum size of memory handled in fastbins. */
static INTERNAL_SIZE_T global_max_fast;
@@ -6095,12 +6089,12 @@ int mALLOPt(param_number, value) int param_number; int value;
@@ -6111,12 +6105,12 @@ int mALLOPt(param_number, value) int par
if (value > 0)
mp_.arena_test = value;
break;

View File

@ -1,3 +1,25 @@
-------------------------------------------------------------------
Wed May 25 15:28:37 UTC 2011 - aj@suse.de
- Run on kernel 2.6.32 or older only - and optimize thus.
- Enable malloc implementation that is be less memory efficient
but higher performing in multi-threaded programs.
- Use --enable-bind-now to avoid lazy binding in ld.so
and libc.so
-------------------------------------------------------------------
Wed May 25 14:38:58 UTC 2011 - aj@suse.de
- Add glibc-bso-12454.diff to not create assert running dynamic linker
in some cases.
- Disable backwards memcpy for x86-64.
-------------------------------------------------------------------
Wed May 25 07:59:27 UTC 2011 - aj@suse.de
- Add glibc-dl-signal-error.diff to not crash the dynamic linker
if dependencies are missing.
-------------------------------------------------------------------
Mon May 23 08:44:47 UTC 2011 - rguenther@novell.com

View File

@ -52,6 +52,9 @@ BuildRequires: libselinux-devel
License: GPLv2+
Summary: Standard Shared Libraries (from the GNU C Library)
Group: System/Libraries
%define enablekernel 2.6.32
Conflicts: kernel < %{enablekernel}
%define exp_malloc 1
Obsoletes: ngpt < 2.2.2 ngpt-devel < 2.2.2
Provides: ngpt = 2.2.2 ngpt-devel = 2.2.2
# bug437293
@ -138,6 +141,8 @@ Patch50: glibc-gconvcache-s390.diff
Patch51: glibc-vfprintf-positional.diff
Patch52: glibc-elf-localscope.diff
Patch53: glibc-zarch-longlong.diff
Patch54: glibc-disable-backward-memcpy.diff
Patch55: glibc-bso-12454.diff
Patch500: ARM_glibc-2.10.1-local-eabi-wchar.diff
Patch501: ARM_glibc-2.10.1-local-hwcap-updates.diff
Patch502: ARM_glibc-2.10.1-local-lowlevellock.diff
@ -351,12 +356,16 @@ rm nscd/s-stamp
%patch45
%patch46 -p1
%patch47 -p1
%if !%{exp_malloc}
%patch48 -p1
%endif
%patch49
%patch50
%patch51 -p1
%patch52
%patch53 -p1
%patch54 -p1
%patch55 -p1
%ifarch %arm armv5tel armv7l
%patch500
%patch501
@ -483,7 +492,12 @@ configure_and_build_glibc() {
%ifarch ppc ppc64 %{ix86} x86_64
--enable-multi-arch \
%endif
--with-tls --with-__thread --enable-kernel=2.6.4
%if %{exp_malloc}
--enable-experimental-malloc \
%endif
--with-tls --with-__thread --enable-kernel=%{enablekernel} \
--enable-bind-now
# Should we enable --enable-nss-crypt to build use freebl3 hash functions?
make $PARALLEL
cd ..
}