Accepting request 580191 from home:Andreas_Schwab:Factory

- Add systemtap-headers to BuildRequires
- Add --enable-systemtap to configure arguments (fate#324969, bsc#1073636)

- riscv-readelflib.patch: Fix parsing flags in ELF64 files on riscv

OBS-URL: https://build.opensuse.org/request/show/580191
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=495
This commit is contained in:
Andreas Schwab 2018-02-26 11:20:11 +00:00 committed by Git OBS Bridge
parent 7446e23b86
commit 2e3e51886a
3 changed files with 76 additions and 22 deletions

View File

@ -3,6 +3,17 @@ Thu Feb 22 15:10:32 UTC 2018 - fvogt@suse.com
- Use %license (boo#1082318)
-------------------------------------------------------------------
Wed Feb 14 12:00:49 UTC 2018 - schwab@suse.de
- Add systemtap-headers to BuildRequires
- Add --enable-systemtap to configure arguments (fate#324969, bsc#1073636)
-------------------------------------------------------------------
Tue Feb 13 10:27:32 UTC 2018 - schwab@suse.de
- riscv-readelflib.patch: Fix parsing flags in ELF64 files on riscv
-------------------------------------------------------------------
Mon Feb 5 08:49:13 UTC 2018 - schwab@suse.de
@ -5763,7 +5774,7 @@ Sat Sep 13 07:01:40 CEST 2003 - kukuk@suse.de
- Add librtkaio, a librt using kernel aio
-------------------------------------------------------------------
Thu Sep 11 16:59:49 CEST 2003 - kukuk@suse.de
Thu Sep 11 16:59:50 CEST 2003 - kukuk@suse.de
- Update to current CVS
- Remove patches which are merged in CVS

View File

@ -48,12 +48,14 @@ ExclusiveArch: do_not_build
%endif
%if %{build_main}
Name: glibc
%define name_suffix %{nil}
%else
Name: glibc-%{flavor}-src
%define name_suffix -%{flavor}-src
%endif
Name: glibc%{name_suffix}
Summary: Standard Shared Libraries (from the GNU C Library)
License: LGPL-2.1+ AND SUSE-LGPL-2.1+-with-GCC-exception AND GPL-2.0+
License: LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later
Group: System/Libraries
BuildRequires: audit-devel
BuildRequires: bison
@ -63,6 +65,7 @@ BuildRequires: libselinux-devel
BuildRequires: makeinfo
BuildRequires: pwdutils
BuildRequires: systemd-rpm-macros
BuildRequires: systemtap-headers
BuildRequires: xz
%if %{build_testsuite}
BuildRequires: gcc-c++
@ -207,6 +210,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
# since it does not work on other architectures.
NoSource: 0
%endif
%if !%{build_main}
NoSource: 0
%endif
#
###
@ -274,6 +280,8 @@ Patch306: glibc-fix-double-loopback.diff
###
# Patches from upstream
###
# PATCH-FIX-UPSTREAM Fix parsing flags in ELF64 files (BZ #22827)
Patch1000: riscv-readelflib.patch
###
# Patches awaiting upstream approval
@ -299,7 +307,7 @@ without these libraries.
%package -n glibc-utils
Summary: Development utilities from the GNU C Library
License: LGPL-2.1+
License: LGPL-2.1-or-later
Group: Development/Languages/C and C++
Requires: glibc = %{version}
@ -312,7 +320,7 @@ If you are unsure if you need this, do not install this package.
%package -n glibc-testsuite
Summary: Testsuite results from the GNU C Library
License: LGPL-2.1+
License: LGPL-2.1-or-later
Group: Development/Languages/C and C++
%description -n glibc-testsuite
@ -321,7 +329,7 @@ This package contains the testsuite results from the GNU C Library.
%if %{build_main}
%package info
Summary: Info Files for the GNU C Library
License: GFDL-1.1
License: GFDL-1.1-only
Group: Documentation/Other
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
@ -334,7 +342,7 @@ complete and is partially out of date.
%package html
Summary: HTML Documentation for the GNU C Library
License: GFDL-1.1
License: GFDL-1.1-only
Group: Documentation/HTML
BuildArch: noarch
@ -345,7 +353,7 @@ partially out of date.
%package i18ndata
Summary: Database Sources for 'locale'
License: GPL-2.0+ AND MIT
License: GPL-2.0-or-later AND MIT
Group: System/Libraries
BuildArch: noarch
@ -357,7 +365,7 @@ created.
%package locale
Summary: Locale Data for Localized Programs
License: GPL-2.0+ AND MIT AND LGPL-2.1+
License: GPL-2.0-or-later AND MIT AND LGPL-2.1-or-later
Group: System/Libraries
Requires(post): /bin/cat
Requires: glibc = %{version}
@ -374,7 +382,7 @@ Locale data for the internationalisation features of the GNU C library.
%package -n nscd
Summary: Name Service Caching Daemon
License: GPL-2.0+
License: GPL-2.0-or-later
Group: System/Daemons
Provides: glibc:/usr/sbin/nscd
Requires: glibc = %{version}
@ -388,7 +396,7 @@ performance with NIS, NIS+, and LDAP.
%package profile
Summary: Libc Profiling and Debugging Versions
License: LGPL-2.1+ AND SUSE-LGPL-2.1+-with-GCC-exception AND GPL-2.0+
License: LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later
Group: Development/Libraries/C and C++
Requires: glibc = %{version}
# bug437293
@ -405,7 +413,7 @@ necessary for profiling and debugging.
%package devel
Summary: Include Files and Libraries Mandatory for Development
License: BSD-3-Clause AND LGPL-2.1+ AND SUSE-LGPL-2.1+-with-GCC-exception AND GPL-2.0+
License: BSD-3-Clause AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later
Group: Development/Libraries/C and C++
Obsoletes: epoll = 1.0
Provides: epoll < 1.0
@ -425,7 +433,7 @@ library.
%package devel-static
Summary: C library static libraries for -static linking
License: BSD-3-Clause AND LGPL-2.1+ AND SUSE-LGPL-2.1+-with-GCC-exception AND GPL-2.0+
License: BSD-3-Clause AND LGPL-2.1-or-later AND LGPL-2.1-or-later WITH GCC-exception-2.0 AND GPL-2.0-or-later
Group: Development/Libraries/C and C++
Requires: %{name}-devel = %{version}
# Provide Fedora name for package to make packaging easier
@ -440,7 +448,7 @@ which is highly discouraged.
# package so that glibc does not require libselinux.
%package extra
Summary: Extra binaries from GNU C Library
License: LGPL-2.1+
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
Requires: glibc = %{version}
@ -483,6 +491,8 @@ mv crypt_blowfish-%crypt_bf_version/*.[chS] crypt/
%patch304 -p1
%patch306 -p1
%patch1000 -p1
%patch2000 -p1
%patch2004 -p1
%patch2005 -p1
@ -639,8 +649,8 @@ configure_and_build_glibc() {
--enable-kernel=%{enablekernel} \
--with-bugurl=http://bugs.opensuse.org \
--enable-bind-now \
--enable-systemtap \
--disable-timezone-tools
# Should we enable --enable-systemtap?
# Should we enable --enable-nss-crypt to build use freebl3 hash functions?
# explicitly set CFLAGS to use the full CFLAGS (not the reduced one for configure)
make %{?_smp_mflags} CFLAGS="$cflags" BUILD_CFLAGS="$cflags"
@ -761,6 +771,15 @@ make %{?_smp_mflags} -C cc-base check-abi
%endif
%install
%if !%{build_testsuite}
%ifarch riscv64
mkdir -p %{buildroot}%{_libdir}
ln -s . %{buildroot}%{_libdir}/lp64d
mkdir -p %{buildroot}/%{_lib}
ln -s . %{buildroot}/%{_lib}/lp64d
%endif
%endif
%if %{build_main}
# We don't want to strip the .symtab from our libraries in find-debuginfo.sh,
# certainly not from libpthread.so.* because it is used by libthread_db to find
@ -777,12 +796,6 @@ export STRIP_KEEP_SYMTAB=*.so*
mkdir -p %{buildroot}%{_libdir}/gconv
touch %{buildroot}%{_libdir}/gconv/gconv-modules.cache
%ifarch riscv64
ln -s . %{buildroot}%{_libdir}/lp64d
mkdir -p %{buildroot}/%{_lib}
ln -s . %{buildroot}/%{_lib}/lp64d
%endif
# Install base glibc
make %{?_smp_mflags} install_root=%{buildroot} install -C cc-base
@ -996,6 +1009,9 @@ rm -f %{buildroot}%{_libdir}/lib*
rm -f %{buildroot}%{_bindir}/{catchsegv,ldd*,sprof}
rm -rf %{buildroot}%{_mandir}/man*
rm -rf %{buildroot}/sbin %{buildroot}%{_includedir}
%ifarch riscv64
rm %{buildroot}/%{_lib}/lp64d %{buildroot}%{_libdir}/lp64d
%endif
%endif # utils

27
riscv-readelflib.patch Normal file
View File

@ -0,0 +1,27 @@
2018-02-09 DJ Delorie <dj@redhat.com>
[BZ #22827]
* sysdeps/unix/sysv/linux/riscv/readelflib.c (process_elf_file): Use
64-bit ELF type for 64-bit ELF objects.
Index: glibc-2.27/sysdeps/unix/sysv/linux/riscv/readelflib.c
===================================================================
--- glibc-2.27.orig/sysdeps/unix/sysv/linux/riscv/readelflib.c
+++ glibc-2.27/sysdeps/unix/sysv/linux/riscv/readelflib.c
@@ -43,6 +43,7 @@ process_elf_file (const char *file_name,
{
ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header;
+ Elf64_Ehdr *elf64_header = (Elf64_Ehdr *) elf_header;
int ret;
long flags;
@@ -59,7 +60,7 @@ process_elf_file (const char *file_name,
{
ret = process_elf64_file (file_name, lib, flag, osversion, soname,
file_contents, file_length);
- flags = elf32_header->e_flags;
+ flags = elf64_header->e_flags;
}
/* RISC-V linkers encode the floating point ABI as part of the ELF headers. */