forked from pool/glibc
Accepting request 90934 from openSUSE:Factory:ARM
- fix building with ports again: * ifuncs tracing backport requires adjustments - avoid using asynchronous-unwind-tables only during configure, but still built the library with unwind tables enabled - replace arm build hack with a proper solution ------------------------------------------------------------------ - armv8l architecture does not exist OBS-URL: https://build.opensuse.org/request/show/90934 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=128
This commit is contained in:
parent
c630e88982
commit
aa6dfe41b1
@ -1,13 +1,9 @@
|
|||||||
--- x86.S
|
--- x86.S
|
||||||
+++ x86.S
|
+++ x86.S
|
||||||
@@ -196,8 +196,8 @@
|
@@ -199,5 +199,5 @@
|
||||||
hlt
|
#endif
|
||||||
jmp BF_die
|
|
||||||
|
#if defined(__ELF__) && defined(__linux__)
|
||||||
-#endif
|
-.section .note.GNU-stack,"",@progbits
|
||||||
-
|
+.section .note.GNU-stack,"",%progbits
|
||||||
#if defined(__ELF__) && defined(__linux__)
|
|
||||||
.section .note.GNU-stack,"",@progbits
|
|
||||||
#endif
|
#endif
|
||||||
+
|
|
||||||
+#endif
|
|
||||||
|
95
glibc-ports-2.15-ifunc-trace.patch
Normal file
95
glibc-ports-2.15-ifunc-trace.patch
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
commit 0507f293c9b67d8eec92e8178308d72f1ed88449
|
||||||
|
Author: Andreas Schwab <schwab@redhat.com>
|
||||||
|
Date: Wed Oct 5 11:51:41 2011 +0200
|
||||||
|
|
||||||
|
arm: don't call ifunc functions in trace mode
|
||||||
|
|
||||||
|
--- a/sysdeps/arm/dl-machine.h
|
||||||
|
+++ b/sysdeps/arm/dl-machine.h
|
||||||
|
@@ -335,7 +335,7 @@ auto inline void
|
||||||
|
__attribute__ ((always_inline))
|
||||||
|
elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
||||||
|
const Elf32_Sym *sym, const struct r_found_version *version,
|
||||||
|
- void *const reloc_addr_arg)
|
||||||
|
+ void *const reloc_addr_arg, int skip_ifunc)
|
||||||
|
{
|
||||||
|
Elf32_Addr *const reloc_addr = reloc_addr_arg;
|
||||||
|
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
||||||
|
@@ -369,9 +369,9 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
||||||
|
Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
|
||||||
|
|
||||||
|
if (sym != NULL
|
||||||
|
- && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
|
||||||
|
- 0)
|
||||||
|
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
||||||
|
+ && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
||||||
|
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
||||||
|
+ && __builtin_expect (!skip_ifunc, 1))
|
||||||
|
value = ((Elf32_Addr (*) (void)) value) ();
|
||||||
|
|
||||||
|
switch (r_type)
|
||||||
|
@@ -430,7 +430,7 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
||||||
|
}
|
||||||
|
case R_ARM_TLS_DESC:
|
||||||
|
{
|
||||||
|
- struct tlsdesc volatile *td =
|
||||||
|
+ struct tlsdesc volatile *td =
|
||||||
|
(struct tlsdesc volatile *)reloc_addr;
|
||||||
|
|
||||||
|
# ifndef RTLD_BOOTSTRAP
|
||||||
|
@@ -454,10 +454,10 @@ elf_machine_rel (struct link_map *map, const Elf32_Rel *reloc,
|
||||||
|
else
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
- {
|
||||||
|
+ {
|
||||||
|
td->argument.value = value + sym_map->l_tls_offset;
|
||||||
|
td->entry = _dl_tlsdesc_return;
|
||||||
|
- }
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
@@ -525,7 +525,7 @@ auto inline void
|
||||||
|
__attribute__ ((always_inline))
|
||||||
|
elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||||
|
const Elf32_Sym *sym, const struct r_found_version *version,
|
||||||
|
- void *const reloc_addr_arg)
|
||||||
|
+ void *const reloc_addr_arg, int skip_ifunc)
|
||||||
|
{
|
||||||
|
Elf32_Addr *const reloc_addr = reloc_addr_arg;
|
||||||
|
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
||||||
|
@@ -543,9 +543,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
|
||||||
|
Elf32_Addr value = sym_map == NULL ? 0 : sym_map->l_addr + sym->st_value;
|
||||||
|
|
||||||
|
if (sym != NULL
|
||||||
|
- && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC,
|
||||||
|
- 0)
|
||||||
|
- && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1))
|
||||||
|
+ && __builtin_expect (ELFW(ST_TYPE) (sym->st_info) == STT_GNU_IFUNC, 0)
|
||||||
|
+ && __builtin_expect (sym->st_shndx != SHN_UNDEF, 1)
|
||||||
|
+ && __builtin_expect (!skip_ifunc, 1))
|
||||||
|
value = ((Elf32_Addr (*) (void)) value) ();
|
||||||
|
|
||||||
|
switch (r_type)
|
||||||
|
@@ -656,7 +656,8 @@ elf_machine_rela_relative (Elf32_Addr l_addr, const Elf32_Rela *reloc,
|
||||||
|
auto inline void
|
||||||
|
__attribute__ ((always_inline))
|
||||||
|
elf_machine_lazy_rel (struct link_map *map,
|
||||||
|
- Elf32_Addr l_addr, const Elf32_Rel *reloc)
|
||||||
|
+ Elf32_Addr l_addr, const Elf32_Rel *reloc,
|
||||||
|
+ int skip_ifunc)
|
||||||
|
{
|
||||||
|
Elf32_Addr *const reloc_addr = (void *) (l_addr + reloc->r_offset);
|
||||||
|
const unsigned int r_type = ELF32_R_TYPE (reloc->r_info);
|
||||||
|
@@ -674,8 +675,8 @@ elf_machine_lazy_rel (struct link_map *map,
|
||||||
|
(struct tlsdesc volatile *)reloc_addr;
|
||||||
|
|
||||||
|
/* The linker must have given us the parameter we need in the
|
||||||
|
- first GOT entry, and left the second one empty. We fill the
|
||||||
|
- last with the resolver address */
|
||||||
|
+ first GOT entry, and left the second one empty. We fill the
|
||||||
|
+ last with the resolver address */
|
||||||
|
assert (td->entry == 0);
|
||||||
|
td->entry = (void*)(D_PTR (map, l_info[ADDRIDX (DT_TLSDESC_PLT)])
|
||||||
|
+ map->l_addr);
|
@ -4,6 +4,16 @@ Tue Nov 8 22:55:40 CET 2011 - dmueller@suse.de
|
|||||||
- make glibc-static provide versioned
|
- make glibc-static provide versioned
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
|
Tue Nov 8 18:20:39 CET 2011 - dmueller@suse.de
|
||||||
|
|
||||||
|
- fix building with ports again:
|
||||||
|
* ifuncs tracing backport requires adjustments
|
||||||
|
|
||||||
|
- avoid using asynchronous-unwind-tables only during configure,
|
||||||
|
but still built the library with unwind tables enabled
|
||||||
|
- replace arm build hack with a proper solution
|
||||||
|
|
||||||
|
------------------------------------------------------------------
|
||||||
Mon Nov 7 21:06:32 CET 2011 - dmueller@suse.de
|
Mon Nov 7 21:06:32 CET 2011 - dmueller@suse.de
|
||||||
|
|
||||||
- update glibc-ports to 2.14.1:
|
- update glibc-ports to 2.14.1:
|
||||||
@ -79,8 +89,8 @@ Thu Sep 22 21:07:43 CEST 2011 - dmueller@suse.de
|
|||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 22 13:10:02 UTC 2011 - adrian@suse.de
|
Thu Sep 22 13:10:02 UTC 2011 - adrian@suse.de
|
||||||
|
|
||||||
- add armv8l architecture
|
|
||||||
- don't enforce armv5tel for all arm architectures anymore
|
- don't enforce armv5tel for all arm architectures anymore
|
||||||
|
- armv8l architecture does not exist
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Sep 20 07:54:21 UTC 2011 - aj@suse.de
|
Tue Sep 20 07:54:21 UTC 2011 - aj@suse.de
|
||||||
|
39
glibc.spec
39
glibc.spec
@ -80,10 +80,12 @@ Obsoletes: glibc-32bit
|
|||||||
Version: 2.14.1
|
Version: 2.14.1
|
||||||
Release: 12
|
Release: 12
|
||||||
%define git_id 4f2b767fef50
|
%define git_id 4f2b767fef50
|
||||||
|
%define glibc_ports_ver %version
|
||||||
Url: http://www.gnu.org/software/libc/libc.html
|
Url: http://www.gnu.org/software/libc/libc.html
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Source: glibc-%{version}-%{git_id}.tar.bz2
|
Source: glibc-%{version}-%{git_id}.tar.bz2
|
||||||
Source2: http://ftp.gnu.org/gnu/glibc/glibc-ports-%{version}.tar.bz2
|
%define glibc_ports_dir glibc-ports-%{glibc_ports_ver}
|
||||||
|
Source2: http://ftp.gnu.org/gnu/glibc/glibc-ports-%{glibc_ports_ver}.tar.bz2
|
||||||
Source3: noversion.tar.bz2
|
Source3: noversion.tar.bz2
|
||||||
Source4: manpages.tar.bz2
|
Source4: manpages.tar.bz2
|
||||||
Source8: nsswitch.conf
|
Source8: nsswitch.conf
|
||||||
@ -209,6 +211,8 @@ Patch73: glibc-resolv-assert.diff
|
|||||||
Patch74: glibc-2.14-fix-ctors.patch
|
Patch74: glibc-2.14-fix-ctors.patch
|
||||||
# PATCH-FIX-UPSTREAM Fix trace and ifuncs aj@suse.de
|
# PATCH-FIX-UPSTREAM Fix trace and ifuncs aj@suse.de
|
||||||
Patch75: glibc-2.15-ifunc-trace.patch
|
Patch75: glibc-2.15-ifunc-trace.patch
|
||||||
|
# PATCH-FIX-UPSTREAM Fix trace and ifuncs (talk to aj@suse.de)
|
||||||
|
Patch76: glibc-ports-2.15-ifunc-trace.patch
|
||||||
# PATCH-FEATURE-OPENSUSE -- add sha support to crypt_blowfish lnussel@suse.de
|
# PATCH-FEATURE-OPENSUSE -- add sha support to crypt_blowfish lnussel@suse.de
|
||||||
Patch80: crypt_blowfish-1.2-sha.diff
|
Patch80: crypt_blowfish-1.2-sha.diff
|
||||||
# PATCH-FEATURE-OPENSUSE -- use separate symbol version for Owl extensions - lnussel@suse.de
|
# PATCH-FEATURE-OPENSUSE -- use separate symbol version for Owl extensions - lnussel@suse.de
|
||||||
@ -217,6 +221,8 @@ Patch81: crypt_blowfish-1.2-versioning.diff
|
|||||||
Patch82: crypt_blowfish-1.2-hack_around_arm.diff
|
Patch82: crypt_blowfish-1.2-hack_around_arm.diff
|
||||||
# PATCH-FIX-UPSTREAM fix unwinding when using clone()
|
# PATCH-FIX-UPSTREAM fix unwinding when using clone()
|
||||||
Patch83: glibc-arm-clone-unwind-fix.diff
|
Patch83: glibc-arm-clone-unwind-fix.diff
|
||||||
|
# PATCH-FIX-OPENSUSE avoid false positive warning that triggers brp postcheck fail
|
||||||
|
Patch84: nscd-avoid-gcc-warning.diff
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The GNU C Library provides the most important standard libraries used
|
The GNU C Library provides the most important standard libraries used
|
||||||
@ -377,8 +383,10 @@ versions of your software.
|
|||||||
%ifarch %arm
|
%ifarch %arm
|
||||||
# add glibc-ports for arm
|
# add glibc-ports for arm
|
||||||
%setup -n glibc-%{version} -q -a 2 -a 3 -a 4
|
%setup -n glibc-%{version} -q -a 2 -a 3 -a 4
|
||||||
mv glibc-ports-* ports
|
pushd %glibc_ports_dir
|
||||||
%patch83
|
%patch76 -p1
|
||||||
|
%patch83 -p1
|
||||||
|
popd
|
||||||
%else
|
%else
|
||||||
# any other leave out ports
|
# any other leave out ports
|
||||||
%setup -n glibc-%{version} -q -a 3 -a 4
|
%setup -n glibc-%{version} -q -a 3 -a 4
|
||||||
@ -388,9 +396,7 @@ tar -xzf %SOURCE50
|
|||||||
pushd crypt_blowfish-%{crypt_bf_version}
|
pushd crypt_blowfish-%{crypt_bf_version}
|
||||||
%patch80 -p1
|
%patch80 -p1
|
||||||
%patch81 -p1
|
%patch81 -p1
|
||||||
%ifarch %arm
|
|
||||||
%patch82
|
%patch82
|
||||||
%endif
|
|
||||||
popd
|
popd
|
||||||
mv crypt/{crypt.h,gnu-crypt.h}
|
mv crypt/{crypt.h,gnu-crypt.h}
|
||||||
mv crypt_blowfish-%crypt_bf_version/*.[chS] crypt/
|
mv crypt_blowfish-%crypt_bf_version/*.[chS] crypt/
|
||||||
@ -456,6 +462,7 @@ rm nscd/s-stamp
|
|||||||
%patch73 -p1
|
%patch73 -p1
|
||||||
%patch74 -p1
|
%patch74 -p1
|
||||||
%patch75 -p1
|
%patch75 -p1
|
||||||
|
%patch84
|
||||||
|
|
||||||
#
|
#
|
||||||
# Inconsistency detected by ld.so: dl-close.c: 719: _dl_close: Assertion `map->l_init_called' failed!
|
# Inconsistency detected by ld.so: dl-close.c: 719: _dl_close: Assertion `map->l_init_called' failed!
|
||||||
@ -548,14 +555,11 @@ PARALLEL="%{?_smp_mflags}"
|
|||||||
%ifarch %ix86
|
%ifarch %ix86
|
||||||
add_ons=$add_ons,noversion
|
add_ons=$add_ons,noversion
|
||||||
%endif
|
%endif
|
||||||
%ifarch %arm
|
%ifarch %arm mipsel
|
||||||
add_ons=$add_ons,ports
|
add_ons=$add_ons,%glibc_ports_dir
|
||||||
# fails to build otherwise - need to recheck and fix
|
# fails to build otherwise - need to recheck and fix
|
||||||
%define enable_stackguard_randomization 0
|
%define enable_stackguard_randomization 0
|
||||||
%endif
|
%endif
|
||||||
%ifarch mipsel
|
|
||||||
add_ons=$add_ons,ports
|
|
||||||
%endif
|
|
||||||
|
|
||||||
configure_and_build_glibc() {
|
configure_and_build_glibc() {
|
||||||
local dirname="$1"; shift
|
local dirname="$1"; shift
|
||||||
@ -563,7 +567,15 @@ configure_and_build_glibc() {
|
|||||||
local addons="$1"; shift
|
local addons="$1"; shift
|
||||||
mkdir "cc-$dirname"
|
mkdir "cc-$dirname"
|
||||||
cd "cc-$dirname"
|
cd "cc-$dirname"
|
||||||
CFLAGS="$cflags" CC="$BuildCC" CXX="$BuildCCplus" ../configure \
|
%ifarch %arm
|
||||||
|
# remove asynchronous-unwind-tables during configure as it causes
|
||||||
|
# some checks to fail spuriously on %arm
|
||||||
|
conf_cflags="${cflags/-fasynchronous-unwind-tables/}"
|
||||||
|
conf_cflags="${conf_cflags/-funwind-tables/}"
|
||||||
|
%else
|
||||||
|
conf_cflags="$cflags"
|
||||||
|
%endif
|
||||||
|
CFLAGS="$conf_cflags" CC="$BuildCC" CXX="$BuildCCplus" ../configure \
|
||||||
--prefix=%{_prefix} \
|
--prefix=%{_prefix} \
|
||||||
--libexecdir=%{_libdir} --infodir=%{_infodir} \
|
--libexecdir=%{_libdir} --infodir=%{_infodir} \
|
||||||
--enable-add-ons=nptl$addons --without-cvs --enable-profile \
|
--enable-add-ons=nptl$addons --without-cvs --enable-profile \
|
||||||
@ -584,7 +596,8 @@ configure_and_build_glibc() {
|
|||||||
--with-tls --with-__thread --enable-kernel=%{enablekernel} \
|
--with-tls --with-__thread --enable-kernel=%{enablekernel} \
|
||||||
--enable-bind-now
|
--enable-bind-now
|
||||||
# Should we enable --enable-nss-crypt to build use freebl3 hash functions?
|
# Should we enable --enable-nss-crypt to build use freebl3 hash functions?
|
||||||
make $PARALLEL
|
# explicitly set CFLAGS to use the full CFLAGS (not the reduced one for configure)
|
||||||
|
make $PARALLEL CFLAGS="$cflags"
|
||||||
cd ..
|
cd ..
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -937,7 +950,7 @@ exit 0
|
|||||||
%ifarch x86_64
|
%ifarch x86_64
|
||||||
/%{_lib}/ld-linux-x86-64.so.2
|
/%{_lib}/ld-linux-x86-64.so.2
|
||||||
%else
|
%else
|
||||||
%ifarch %arm armv5tel armv7l armv8l
|
%ifarch %arm
|
||||||
/%{_lib}/ld-linux.so.3
|
/%{_lib}/ld-linux.so.3
|
||||||
%else
|
%else
|
||||||
/%{_lib}/ld-linux.so.2
|
/%{_lib}/ld-linux.so.2
|
||||||
|
11
nscd-avoid-gcc-warning.diff
Normal file
11
nscd-avoid-gcc-warning.diff
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- nscd/connections.c
|
||||||
|
+++ nscd/connections.c
|
||||||
|
@@ -1717,6 +1717,8 @@
|
||||||
|
++nready;
|
||||||
|
}
|
||||||
|
/* NOTREACHED */
|
||||||
|
+ assert(0);
|
||||||
|
+ return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user