SHA256
1
0
forked from pool/glibc

Accepting request 114555 from home:a_jaeger:my-factory-packages

Optimize build.

OBS-URL: https://build.opensuse.org/request/show/114555
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=169
This commit is contained in:
Andreas Jaeger 2012-04-19 08:18:58 +00:00 committed by Git OBS Bridge
parent 053ef854bb
commit a235bac650
7 changed files with 138 additions and 154 deletions

View File

@ -16,8 +16,8 @@ index 491dd0a..5464959 100644
arm.*-.*-linux.* ld=ld-linux.so.2
--- glibc-2.15/elf/dl-load.c.~1~ 2011-12-30 23:13:56.000000000 +0100
+++ glibc-2.15/elf/dl-load.c 2012-04-17 15:10:46.235625419 +0200
@@ -2082,6 +2082,9 @@
+++ glibc-2.15/elf/dl-load.c 2012-04-18 15:05:33.203485389 +0200
@@ -2082,10 +2082,13 @@
soname = ((const char *) D_PTR (l, l_info[DT_STRTAB])
+ l->l_info[DT_SONAME]->d_un.d_val);
if (strcmp (name, soname) != 0)
@ -27,3 +27,8 @@ index 491dd0a..5464959 100644
continue;
/* We have a match on a new name -- cache it. */
- add_name_to_object (l, soname);
+ add_name_to_object (l, name);
l->l_soname_added = 1;
}

View File

@ -1,30 +0,0 @@
Index: glibc-2.14/elf/soinit.c
===================================================================
--- glibc-2.14.orig/elf/soinit.c
+++ glibc-2.14/elf/soinit.c
@@ -26,7 +26,11 @@ void
__libc_global_ctors (void)
{
/* Call constructor functions. */
- run_hooks (__CTOR_LIST__);
+ void (**tem)();
+ asm ("" : "=r" (tem) : "0" (__CTOR_LIST__));
+ /* Call destructor functions. */
+
+ run_hooks (tem);
}
@@ -36,7 +40,11 @@ void
__libc_fini (void)
{
/* Call destructor functions. */
- run_hooks (__DTOR_LIST__);
+ void (**tem)();
+ asm ("" : "=r" (tem) : "0" (__DTOR_LIST__));
+ /* Call destructor functions. */
+
+ run_hooks (tem);
}
void (*_fini_ptr) (void) __attribute__ ((section (".fini_array")))

View File

@ -1,38 +0,0 @@
Index: nscd/nscd.conf
===================================================================
--- nscd/nscd.conf.orig 2010-01-18 18:01:41.000000000 +0100
+++ nscd/nscd.conf 2010-02-14 14:58:08.000000000 +0100
@@ -61,11 +61,11 @@
auto-propagate group yes
enable-cache hosts yes
- positive-time-to-live hosts 3600
- negative-time-to-live hosts 20
+ positive-time-to-live hosts 600
+ negative-time-to-live hosts 0
suggested-size hosts 211
check-files hosts yes
- persistent hosts yes
+ persistent hosts no
shared hosts yes
max-db-size hosts 33554432
Index: nscd/nscd_stat.c
===================================================================
--- nscd/nscd_stat.c.orig 2010-01-18 18:01:41.000000000 +0100
+++ nscd/nscd_stat.c 2010-02-14 15:02:41.000000000 +0100
@@ -37,8 +37,13 @@
#endif /* HAVE_SELINUX */
-/* We use this to make sure the receiver is the same. */
+/* We use this to make sure the receiver is the same. Capture mtime
+ of this file if possible. */
+#if defined(__TIMESTAMP__)
+static const char compilation[21] = __TIMESTAMP__;
+#else
static const char compilation[21] = __DATE__ " " __TIME__;
+#endif
/* Statistic data for one database. */
struct dbstat

View File

@ -1,3 +1,23 @@
Index: glibc-2.15/nscd/nscd_stat.c
===================================================================
--- glibc-2.15/nscd/nscd_stat.c.orig 2010-01-18 18:01:41.000000000 +0100
+++ glibc-2.15/nscd/nscd_stat.c 2010-02-14 15:02:41.000000000 +0100
@@ -37,8 +37,13 @@
#endif /* HAVE_SELINUX */
-/* We use this to make sure the receiver is the same. */
+/* We use this to make sure the receiver is the same. Capture mtime
+ of this file if possible. */
+#if defined(__TIMESTAMP__)
+static const char compilation[21] = __TIMESTAMP__;
+#else
static const char compilation[21] = __DATE__ " " __TIME__;
+#endif
/* Statistic data for one database. */
struct dbstat
Index: glibc-2.15/csu/Makefile
===================================================================
--- glibc-2.15.orig/csu/Makefile

19
glibc-nscd.conf.patch Normal file
View File

@ -0,0 +1,19 @@
Index: nscd/nscd.conf
===================================================================
--- nscd/nscd.conf.orig 2010-01-18 18:01:41.000000000 +0100
+++ nscd/nscd.conf 2010-02-14 14:58:08.000000000 +0100
@@ -61,11 +61,11 @@
auto-propagate group yes
enable-cache hosts yes
- positive-time-to-live hosts 3600
- negative-time-to-live hosts 20
+ positive-time-to-live hosts 600
+ negative-time-to-live hosts 0
suggested-size hosts 211
check-files hosts yes
- persistent hosts yes
+ persistent hosts no
shared hosts yes
max-db-size hosts 33554432

View File

@ -2,6 +2,9 @@
Wed Apr 18 11:35:48 UTC 2012 - aj@suse.de
- Build profiled libs only for base.
- Cleanup patches.
- Remove glibc-2.14-fix-ctors.patch, we have proper support in
binutils now.
-------------------------------------------------------------------
Tue Apr 17 12:35:21 UTC 2012 - aj@suse.de

View File

@ -147,7 +147,7 @@ NoSource: 0
###
# Patches are ordered as:
# Patches that we will never upstream or which have not been looked at: 0000-0999
# Patches that we will never upstream or which have not been looked at: 0-999
# Patches taken from upstream: 1000-2000
# Patches that are going upstream, waiting approval: 2000-3000
###
@ -155,96 +155,93 @@ NoSource: 0
###
# Patches that upstream will not accept
###
# PATCH-FIX-OPENSUSE remove lfs test from testsuite aj@suse.de
Patch0: glibc-testsuite.patch
# PATCH-FIX-OPENSUSE handle glibc binaries
Patch1: glibc-2.3.90-noversion.diff
# PATCH-FIX-OPENSUSE reload /etc/resolv.conf on change
Patch3: glibc-resolv-reload.diff
# PATCH-FIX-OPENSUSE Add additional locales
Patch4: glibc-2.3.locales.diff.bz2
###
# openSUSE specific patches - won't go upstream
###
### openSUSE extensions, configuration
# PATCH-FEATURE-OPENSUSE -- add crypt_blowfish support - bnc#700876
Patch5: glibc-2.14-crypt.diff
Patch0005: glibc-2.14-crypt.diff
# PATCH-FEATURE-OPENSUSE -- use separate symbol version for Owl extensions - lnussel@suse.de
Patch6: glibc-2.14-crypt-versioning.diff
Patch0006: glibc-2.14-crypt-versioning.diff
# PATCH-FEATURE-OPENSUSE -- add sha support to crypt_blowfish lnussel@suse.de
Patch0080: crypt_blowfish-1.2-sha.diff
# PATCH-FEATURE-OPENSUSE -- use separate symbol version for Owl extensions - lnussel@suse.de
Patch0081: crypt_blowfish-1.2-versioning.diff
# PATCH-FIX-OPENSUSE Avoid build failure on noexecstack marker on ARM dmueller@suse.de
Patch0082: crypt_blowfish-1.2-hack_around_arm.diff
# PATCH-FIX-OPENSUSE Fix path for nscd databases
Patch23: glibc-2.3.3-nscd-db-path.diff
# PATCH-FIX-OPENSUSE Fix path for nss_db (bnc#753657) - aj@suse.de
Patch97: nss-db-path.patch
# PATCH-FIX-OPENSUSE adjust nscd.conf
Patch22: glibc-nscd.conf.patch
# PATCH-FIX-OPENSUSE do not use compile time in binaries
Patch87: glibc-nodate.patch
# PATCH-FIX-OPENSUSE -- add some extra information to version output - kukuk@suse.de
Patch7: glibc-version.diff
# PATCH-FIX-OPENSUSE Support pre-EURO currencies (XXX: Still needed?)
Patch8: glibc-2.4.90-revert-only-euro.diff
# PATCH-FIX-OPENSUSE remove lfs test from testsuite aj@suse.de
Patch0: glibc-testsuite.patch
# PATCH-FIX-OPENSUSE handle old glibc binaries
Patch1: glibc-2.3.90-noversion.diff
# PATCH-FIX-OPENSUSE -- Make --no-archive default for localedef - kukuk@suse.de
Patch12: glibc-2.3.2.no_archive.diff
# PATCH-FIX-OPENSUSE -- add blacklist for bindresvport
Patch14: glibc-2.3.90-bindresvport.blacklist.diff
# PATCH-FIX-OPENSUSE -- Add no_NO back (XXX: Still needed?)
Patch16: glibc-2.4.90-no_NO.diff
# PATCH-FIX-OPENSUSE -- Renames for China
Patch20: glibc-2.4-china.diff
# PATCH-FIX-OPENSUSE Fix gb18030 code bnc#54080
Patch21: gb18030.patch.bz2
# PATCH-FIX-OPENSUSE Handle timestamp, adjust nscd.conf
Patch22: glibc-2.4.90-nscd.diff
# PATCH-FIX-OPENSUSE Fix path for nscd databases
Patch23: glibc-2.3.3-nscd-db-path.diff
# PATCH-FIX-OPENSUSE prefer -lang rpm packages
Patch25: glibc-2.3.90-langpackdir.diff
# PATCH-FIX-OPENSUSE Fix hangs in UDP RPC calls bso#5379 bnc#257745 aj@suse.de
Patch28: glibc-2.2-sunrpc.diff
# PATCH-FIX-OPENSUSE Do not generate hardlink for getconf
Patch29: glibc-2.8-getconf.diff
# PATCH-FIX-OPENSUSE only use ipv6 if real ipv6 address exists bnc#361697, bnc#684534
Patch30: getaddrinfo-ipv6-sanity.diff
# PATCH-FIX-OPENSUSE add option --enable-runbinaries to disable running of compiled binaries
Patch33: glibc-compiled-binaries.diff
# PATCH-FIX-OPENSUSE don't use unwind tables for initfini (solved differently for glibc 2.16)
Patch36: glibc-no-unwind-tables.diff
# PATCH-FEATURE-SLE increase cpusetsize to 4096, needs to be kept for compatibility kukuk@suse.de
# PATCH-FEATURE-SLE increase cpusetsize to 4096, needs to be kept for compatibility kukuk@suse.de (XXX: Review)
Patch38: glibc-cpusetsize.diff
# PATCH-FIX-OPENSUSE Do not trigger an abort when an i586 Intel CPU is running the i686 library, as valgrind does. bnc#681398 aj@suse.de
Patch71: x86-cpuid-level2.patch
### Locale related patches
# PATCH-FIX-OPENSUSE Add additional locales
Patch0100: glibc-2.3.locales.diff.bz2
# PATCH-FIX-OPENSUSE Support pre-EURO currencies (XXX: Still needed?)
Patch0101: glibc-2.4.90-revert-only-euro.diff
# PATCH-FIX-OPENSUSE -- Add no_NO back (XXX: Still needed?)
Patch0102: glibc-2.4.90-no_NO.diff
# PATCH-FIX-OPENSUSE -- Renames for China
Patch0103: glibc-2.4-china.diff
# PATCH-FIX-OPENSUSE Fix gb18030 code bnc#54080
Patch0104: gb18030.patch.bz2
### Broken patches in glibc that we revert for now:
# PATCH-FEATURE-OPENSUSE Revert sunrpc removal aj@suse.de
Patch0066: glibc2.14-revert-sunrpc-removal.patch
# PATCH-FIX-OPENSUSE revert seeking on fclose for now bnc#711829 matz@suse.de
Patch0067: glibc-revert-fseek-on-fclose.diff
# PATCH-FIX-OPENSUSE revert pthread-cond-wait change since it causes hangs - aj@suse.de
Patch88: pthread-cond-wait-revert.patch
### Network related patches
# PATCH-FIX-OPENSUSE reload /etc/resolv.conf on change
Patch3: glibc-resolv-reload.diff
# PATCH-FIX-OPENSUSE Fix hangs in UDP RPC calls bso#5379 bnc#257745 aj@suse.de
Patch28: glibc-2.2-sunrpc.diff
# PATCH-FIX-OPENSUSE only use ipv6 if real ipv6 address exists bnc#361697, bnc#684534
Patch30: getaddrinfo-ipv6-sanity.diff
# PATCH-FIX-OPENSUSE Consider private IPv4 addresses as global-scope in gai.conf [bnc#597616]
Patch45: glibc-gai-private4.diff
# PATCH-FIX-OPENSUSE Warn about usage of mdns in resolv.conv
Patch46: glibc-resolv-mdnshint.diff
# PATCH-FIX-OPENSUSE nscd does not account for 'multi on' in /etc/host.conf when ai-resolving host bso#11928
Patch47: glibc-nscd-hconf.diff
# PATCH-FIX-OPENSUSE _fini does not have proper unwinding information on x86_64 bso#11610
Patch49: glibc-fini-unwind.diff
# PATCH-FIX-OPENSUSE bnc#657627, http://sourceware.org/bugzilla/show_bug.cgi?id=12561
Patch52: glibc-elf-localscope.diff
# FIX-OPENSUSE compile some files with -fno-strict-aliasing
Patch58: glibc-strict-aliasing.diff
# PATCH-FIX-OPENSUSE disable rewriting ::1 to 127.0.0.1 for /etc/hosts bnc#684534, bnc#706719
Patch65: glibc-fix-double-loopback.diff
# PATCH-FEATURE-OPENSUSE Revert sunrpc removal aj@suse.de
Patch66: glibc2.14-revert-sunrpc-removal.patch
# PATCH-FIX-OPENSUSE revert seeking on fclose for now bnc#711829 matz@suse.de
Patch67: glibc-revert-fseek-on-fclose.diff
# PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140, bso#13579 matz@suse.de
Patch68: glibc-fix-lookup-crash.patch
# PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140, bso#13579 matz@suse.de
Patch69: glibc-fix-noload.patch
# PATCH-FIX-OPENSUSE Do not trigger an abort when an i586 Intel CPU is running the i686 library, as valgrind does. bnc#681398 aj@suse.de
Patch71: x86-cpuid-level2.patch
# PATCH-FIX-OPENSUSE Run ctors (bnc#717671) aj@suse.de
Patch74: glibc-2.14-fix-ctors.patch
# PATCH-FEATURE-OPENSUSE -- add sha support to crypt_blowfish lnussel@suse.de
Patch80: crypt_blowfish-1.2-sha.diff
# PATCH-FEATURE-OPENSUSE -- use separate symbol version for Owl extensions - lnussel@suse.de
Patch81: crypt_blowfish-1.2-versioning.diff
# PATCH-FIX-OPENSUSE Avoid build failure on noexecstack marker on ARM dmueller@suse.de
Patch82: crypt_blowfish-1.2-hack_around_arm.diff
### Misc patches
# PATCH-FIX-OPENSUSE don't use unwind tables for initfini (solved differently for glibc 2.16)
Patch36: glibc-no-unwind-tables.diff
# FIX-OPENSUSE compile some files with -fno-strict-aliasing
Patch58: glibc-strict-aliasing.diff
# PATCH-FIX-OPENSUSE avoid false positive warning that triggers brp postcheck fail
Patch84: nscd-avoid-gcc-warning.diff
# PATCH-FIX-OPENSUSE fixed build-compare by omitting one more date - meissner@suse.de
Patch87: glibc-nodate.patch
# PATCH-FIX-OPENSUSE revert pthread-cond-wait change since it causes hangs - aj@suse.de
Patch88: pthread-cond-wait-revert.patch
# PATCH-FIX-OPENSUSE Fix cycle detection - aj@suse.de
Patch95: cycle-detection.patch
# PATCH-FIX-OPENSUSE Fix LD_PROFILE (glibc bug#13818) - aj@suse.de
Patch96: glibc-ld-profile.patch
# PATCH-FIX-OPENSUSE Fix path for nss_db (bnc#753657) - aj@suse.de
Patch97: nss-db-path.patch
# PATCH-FIX-OPENSUSE Fix cycle detection 2 (from Fedora) - aj@suse.de
Patch100: glibc-sw13618-2.patch
###
# Patches from upstream
@ -279,6 +276,18 @@ Patch2001: glibc-resolv-assert.diff
Patch2002: armhf-ld-so.patch
# PATCH-FIX-UPSTREAM Fix crash when nscd is not running (bso#135949) - aj@suse.de
Patch2003: glibc-nscd-crash-bso13594.patch
# PATCH-FIX-OPENSUSE Fix crash (access-after-free) in dl_lookup_x bnc#703140, bso#13579 matz@suse.de
Patch69: glibc-fix-noload.patch
# PATCH-FIX-OPENSUSE bnc#657627, http://sourceware.org/bugzilla/show_bug.cgi?id=12561
Patch52: glibc-elf-localscope.diff
# PATCH-FIX-OPENSUSE Fix cycle detection - aj@suse.de
Patch95: cycle-detection.patch
# PATCH-FIX-OPENSUSE Fix cycle detection 2 (from Fedora) - aj@suse.de
Patch99: glibc-sw13618-2.patch
# PATCH-FIX-OPENSUSE Fix LD_PROFILE (glibc bug#13818) - aj@suse.de
Patch96: glibc-ld-profile.patch
# PATCH-FIX-OPENSUSE _fini does not have proper unwinding information on x86_64 bso#11610
Patch49: glibc-fini-unwind.diff
%description
The GNU C Library provides the most important standard libraries used
@ -460,9 +469,9 @@ versions of your software.
# Owl crypt_blowfish
tar -xzf %SOURCE50
pushd crypt_blowfish-%{crypt_bf_version}
%patch80 -p1
%patch81 -p1
%patch82
%patch0080 -p1
%patch0081 -p1
%patch0082
popd
mv crypt/{crypt.h,gnu-crypt.h}
mv crypt_blowfish-%crypt_bf_version/*.[chS] crypt/
@ -471,16 +480,16 @@ mv crypt_blowfish-%crypt_bf_version/*.[chS] crypt/
# libNoVersion part is only active on ix86
%patch1 -p1
%patch3
%patch4
%patch5 -p1
%patch6 -p1
%patch0100
%patch0005 -p1
%patch0006 -p1
%patch7
%patch8
%patch0101
%patch12
%patch14
%patch16 -p1
%patch20 -p1
%patch21 -p1
%patch0102 -p1
%patch0103 -p1
%patch0104 -p1
# avoid changing nscd_stat.c mtime to avoid code generation
# differences on each rebuild
touch -r nscd/nscd_stat.c nscd/s-stamp
@ -504,14 +513,11 @@ rm nscd/s-stamp
%patch52
%patch58 -p1
%patch65 -p1
%patch66 -p1
%patch67 -p1
# XXX Patch 69 replaces 68, remove soon
#%patch68 -p1
%patch0066 -p1
%patch0067 -p1
%patch69 -p1
%patch71 -p1
%patch2001 -p1
%patch74 -p1
%patch1000 -p1
%patch84 -p1
%patch87 -p1
@ -527,11 +533,10 @@ rm nscd/s-stamp
%patch97 -p1
%patch2003 -p1
%patch1006 -p1
%patch100 -p1
%patch99 -p1
%patch1007 -p1
%patch1008 -p1
%ifarch armv7l
# Disable for now, wait for final upstream patch
%patch2002 -p1
%endif
@ -666,7 +671,7 @@ configure_and_build_glibc() {
profile="--disable-profile"
%if %{build_profile}
if [ "$dirname" -eq "base" ] ; then
if [ "$dirname" = "base" ] ; then
profile="--enable-profile"
fi
%endif