diff --git a/.abf.yml b/.abf.yml index fdbc28b..1da2620 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,4 +1,4 @@ sources: - glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f - glibc-2.29.tar.xz: c8376086203fa5e39dc869235ab8a400ed747c44 glibc-2.29.tar.xz.sig: dc1ed0f1f7746507b737d0e5e83b225a42e4a84a + glibc-2.30.tar.xz: 4df7e4dbb92b5ced729d972b32e3b8683db4a689 + glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f diff --git a/glibc-2.29-strict-aliasing.patch b/glibc-2.29-strict-aliasing.patch index 4ff48f1..fa4f298 100644 --- a/glibc-2.29-strict-aliasing.patch +++ b/glibc-2.29-strict-aliasing.patch @@ -1,7 +1,6 @@ -diff -up glibc-2.29/csu/libc-start.c.omv~ glibc-2.29/csu/libc-start.c -diff -up glibc-2.29/csu/Makefile.omv~ glibc-2.29/csu/Makefile ---- glibc-2.29/csu/Makefile.omv~ 2019-02-01 12:56:29.350902408 +0100 -+++ glibc-2.29/csu/Makefile 2019-02-01 12:56:37.276973565 +0100 +diff -up glibc-2.30/csu/Makefile.59~ glibc-2.30/csu/Makefile +--- glibc-2.30/csu/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/csu/Makefile 2019-08-02 14:02:25.655110470 +0200 @@ -114,7 +114,7 @@ endif asm-CPPFLAGS += -I$(objpfx). @@ -11,22 +10,9 @@ diff -up glibc-2.29/csu/Makefile.omv~ glibc-2.29/csu/Makefile include ../Rules -diff -up glibc-2.29/setjmp/Makefile.omv~ glibc-2.29/setjmp/Makefile ---- glibc-2.29/setjmp/Makefile.omv~ 2019-02-01 12:57:17.619335768 +0100 -+++ glibc-2.29/setjmp/Makefile 2019-02-01 12:57:39.538532599 +0100 -@@ -31,6 +31,9 @@ tests := tst-setjmp jmpbug bug269-setjm - tst-sigsetjmp tst-setjmp-static - tests-static := tst-setjmp-static - -+CFLAGS-sigjmp.c += -fno-strict-aliasing -+CFLAGS-longjmp.c += -fno-strict-aliasing -+CFLAGS-longjmp_chk.c += -fno-strict-aliasing - - include ../Rules - -diff -up glibc-2.29/debug/Makefile.omv~ glibc-2.29/debug/Makefile ---- glibc-2.29/debug/Makefile.omv~ 2019-03-30 03:01:07.097615956 +0100 -+++ glibc-2.29/debug/Makefile 2019-03-30 03:01:59.144920770 +0100 +diff -up glibc-2.30/debug/Makefile.59~ glibc-2.30/debug/Makefile +--- glibc-2.30/debug/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/debug/Makefile 2019-08-02 14:02:25.655110470 +0200 @@ -109,6 +109,8 @@ CPPFLAGS-tst-longjmp_chk2.c += -D_FORTIF CFLAGS-tst-longjmp_chk3.c += -fexceptions -fasynchronous-unwind-tables CPPFLAGS-tst-longjmp_chk3.c += -D_FORTIFY_SOURCE=1 @@ -36,9 +22,9 @@ diff -up glibc-2.29/debug/Makefile.omv~ glibc-2.29/debug/Makefile # We know these tests have problems with format strings, this is what # we are testing. Disable that warning. They are also testing # deprecated functions (notably gets) so disable that warning as well. -diff -up glibc-2.29/inet/Makefile.omv~ glibc-2.29/inet/Makefile ---- glibc-2.29/inet/Makefile.omv~ 2019-03-30 03:05:58.653583520 +0100 -+++ glibc-2.29/inet/Makefile 2019-03-30 03:36:46.336546885 +0100 +diff -up glibc-2.30/inet/Makefile.59~ glibc-2.30/inet/Makefile +--- glibc-2.30/inet/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/inet/Makefile 2019-08-02 14:02:25.655110470 +0200 @@ -106,6 +106,20 @@ CFLAGS-getnetgrent_r.c += -fexceptions CFLAGS-tst-checks-posix.c += -std=c99 CFLAGS-tst-sockaddr.c += -fno-strict-aliasing @@ -60,10 +46,10 @@ diff -up glibc-2.29/inet/Makefile.omv~ glibc-2.29/inet/Makefile endif ifeq ($(build-static-nss),yes) -diff -up glibc-2.29/libio/Makefile.omv~ glibc-2.29/libio/Makefile ---- glibc-2.29/libio/Makefile.omv~ 2019-03-30 01:39:01.060542141 +0100 -+++ glibc-2.29/libio/Makefile 2019-03-30 01:42:50.636635556 +0100 -@@ -150,6 +150,19 @@ CFLAGS-iofopen.c += -fexceptions +diff -up glibc-2.30/libio/Makefile.59~ glibc-2.30/libio/Makefile +--- glibc-2.30/libio/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/libio/Makefile 2019-08-02 14:02:25.656110465 +0200 +@@ -154,6 +154,19 @@ CFLAGS-iofopen.c += -fexceptions CFLAGS-iofopen64.c += -fexceptions CFLAGS-oldtmpfile.c += -fexceptions # XXX Do we need filedoalloc and wfiledoalloc? Others? @@ -83,10 +69,21 @@ diff -up glibc-2.29/libio/Makefile.omv~ glibc-2.29/libio/Makefile CFLAGS-tst_putwc.c += -DOBJPFX=\"$(objpfx)\" -diff -up glibc-2.29/misc/Makefile.omv~ glibc-2.29/misc/Makefile ---- glibc-2.29/misc/Makefile.omv~ 2019-03-30 01:52:31.674329260 +0100 -+++ glibc-2.29/misc/Makefile 2019-03-30 01:52:50.631439902 +0100 -@@ -135,6 +135,8 @@ CFLAGS-sbrk.op = $(no-stack-protector) +diff -up glibc-2.30/locale/Makefile.59~ glibc-2.30/locale/Makefile +--- glibc-2.30/locale/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/locale/Makefile 2019-08-02 14:02:25.658110454 +0200 +@@ -105,6 +105,7 @@ CPPFLAGS-locale-programs = -DLOCALE_PATH + CFLAGS-charmap.c += -Wno-write-strings -Wno-char-subscripts + CFLAGS-locfile.c += -Wno-write-strings -Wno-char-subscripts + CFLAGS-charmap-dir.c += -Wno-write-strings ++CFLAGS-C-ctype.c += -fno-strict-aliasing + + # Set libof-* for each routine. + cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \ +diff -up glibc-2.30/misc/Makefile.59~ glibc-2.30/misc/Makefile +--- glibc-2.30/misc/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/misc/Makefile 2019-08-02 14:02:25.656110465 +0200 +@@ -136,6 +136,8 @@ CFLAGS-sbrk.op = $(no-stack-protector) CFLAGS-brk.o = $(no-stack-protector) CFLAGS-brk.op = $(no-stack-protector) @@ -95,9 +92,9 @@ diff -up glibc-2.29/misc/Makefile.omv~ glibc-2.29/misc/Makefile include ../Rules $(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib) -diff -up glibc-2.29/nis/Makefile.omv~ glibc-2.29/nis/Makefile ---- glibc-2.29/nis/Makefile.omv~ 2019-03-30 04:09:44.362755054 +0100 -+++ glibc-2.29/nis/Makefile 2019-03-30 04:10:02.983008221 +0100 +diff -up glibc-2.30/nis/Makefile.59~ glibc-2.30/nis/Makefile +--- glibc-2.30/nis/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/nis/Makefile 2019-08-02 14:02:25.656110465 +0200 @@ -92,6 +92,7 @@ endif # have-GLIBC_2.28 include ../Rules @@ -106,14 +103,15 @@ diff -up glibc-2.29/nis/Makefile.omv~ glibc-2.29/nis/Makefile ifeq ($(build-obsolete-nsl),yes) $(objpfx)libnss_nis.so: $(objpfx)libnsl.so$(libnsl.so-version) \ -diff -up glibc-2.29/nptl/Makefile.omv~ glibc-2.29/nptl/Makefile ---- glibc-2.29/nptl/Makefile.omv~ 2019-03-30 01:54:13.009910066 +0100 -+++ glibc-2.29/nptl/Makefile 2019-03-30 02:54:03.985495103 +0100 -@@ -231,6 +231,18 @@ CFLAGS-fsync.c += -fexceptions -fasynchr +diff -up glibc-2.30/nptl/Makefile.59~ glibc-2.30/nptl/Makefile +--- glibc-2.30/nptl/Makefile.59~ 2019-08-02 14:02:25.469111491 +0200 ++++ glibc-2.30/nptl/Makefile 2019-08-02 14:02:25.656110465 +0200 +@@ -234,6 +234,19 @@ CFLAGS-fsync.c += -fexceptions -fasynchr CFLAGS-pt-system.c += -fexceptions +CFLAGS-pthread_create.c += -fno-strict-aliasing ++CFLAGS-sem_clockwait.c += -fno-strict-aliasing +CFLAGS-sem_wait.c += -fno-strict-aliasing +CFLAGS-sem_waitcommon.c += -fno-strict-aliasing +CFLAGS-sem_timedwait.c += -fno-strict-aliasing @@ -128,9 +126,9 @@ diff -up glibc-2.29/nptl/Makefile.omv~ glibc-2.29/nptl/Makefile LDLIBS-tst-once5 = -lstdc++ CFLAGS-tst-thread_local1.o = -std=gnu++11 LDLIBS-tst-thread_local1 = -lstdc++ -diff -up glibc-2.29/nscd/Makefile.omv~ glibc-2.29/nscd/Makefile ---- glibc-2.29/nscd/Makefile.omv~ 2019-03-30 03:52:06.514438444 +0100 -+++ glibc-2.29/nscd/Makefile 2019-03-30 04:16:11.619357418 +0100 +diff -up glibc-2.30/nscd/Makefile.59~ glibc-2.30/nscd/Makefile +--- glibc-2.30/nscd/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/nscd/Makefile 2019-08-02 14:02:25.656110465 +0200 @@ -79,6 +79,14 @@ CFLAGS-nscd_gethst_r.c += -fexceptions CFLAGS-nscd_getai.c += -fexceptions CFLAGS-nscd_initgroups.c += -fexceptions @@ -146,20 +144,20 @@ diff -up glibc-2.29/nscd/Makefile.omv~ glibc-2.29/nscd/Makefile CPPFLAGS-nscd += -D_FORTIFY_SOURCE=2 ifeq (yesyes,$(have-fpie)$(build-shared)) -diff -up glibc-2.29/nss/Makefile.omv~ glibc-2.29/nss/Makefile ---- glibc-2.29/nss/Makefile.omv~ 2019-03-30 03:04:47.253152286 +0100 -+++ glibc-2.29/nss/Makefile 2019-03-30 03:40:14.235313434 +0100 -@@ -176,3 +176,6 @@ $(objpfx)tst-nss-files-hosts-multi: $(li - $(objpfx)tst-nss-files-hosts-getent: $(libdl) - $(objpfx)tst-nss-files-alias-leak: $(libdl) +diff -up glibc-2.30/nss/Makefile.59~ glibc-2.30/nss/Makefile +--- glibc-2.30/nss/Makefile.59~ 2019-08-02 14:02:25.656110465 +0200 ++++ glibc-2.30/nss/Makefile 2019-08-02 14:03:29.043761884 +0200 +@@ -182,3 +182,6 @@ $(objpfx)tst-nss-files-alias-leak: $(lib $(objpfx)tst-nss-files-alias-leak.out: $(objpfx)/libnss_files.so + $(objpfx)tst-nss-files-alias-truncated: $(libdl) + $(objpfx)tst-nss-files-alias-truncated.out: $(objpfx)/libnss_files.so + +CFLAGS-getnssent_r.c += -fno-strict-aliasing +CFLAGS-digits_dots.c += -fno-strict-aliasing -diff -up glibc-2.29/posix/Makefile.omv~ glibc-2.29/posix/Makefile ---- glibc-2.29/posix/Makefile.omv~ 2019-03-30 01:46:24.029606033 +0100 -+++ glibc-2.29/posix/Makefile 2019-03-30 01:50:14.205620892 +0100 -@@ -242,6 +242,13 @@ CFLAGS-execvp.os = -fomit-frame-pointer +diff -up glibc-2.30/posix/Makefile.59~ glibc-2.30/posix/Makefile +--- glibc-2.30/posix/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/posix/Makefile 2019-08-02 14:02:25.657110460 +0200 +@@ -246,6 +246,13 @@ CFLAGS-execvp.os = -fomit-frame-pointer CFLAGS-execlp.os = -fomit-frame-pointer CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables @@ -173,10 +171,10 @@ diff -up glibc-2.29/posix/Makefile.omv~ glibc-2.29/posix/Makefile tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \ --none random --col --color --colour -diff -up glibc-2.29/resolv/Makefile.omv~ glibc-2.29/resolv/Makefile ---- glibc-2.29/resolv/Makefile.omv~ 2019-03-30 03:03:22.248963330 +0100 -+++ glibc-2.29/resolv/Makefile 2019-03-30 04:08:30.501708568 +0100 -@@ -147,6 +147,19 @@ include ../gen-locales.mk +diff -up glibc-2.30/resolv/Makefile.59~ glibc-2.30/resolv/Makefile +--- glibc-2.30/resolv/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/resolv/Makefile 2019-08-02 14:02:25.657110460 +0200 +@@ -143,6 +143,19 @@ include ../gen-locales.mk CFLAGS-res_hconf.c += -fexceptions @@ -196,9 +194,9 @@ diff -up glibc-2.29/resolv/Makefile.omv~ glibc-2.29/resolv/Makefile # The DNS NSS modules needs the resolver. $(objpfx)libnss_dns.so: $(objpfx)libresolv.so -diff -up glibc-2.29/rt/Makefile.omv~ glibc-2.29/rt/Makefile ---- glibc-2.29/rt/Makefile.omv~ 2019-03-30 03:59:15.091352740 +0100 -+++ glibc-2.29/rt/Makefile 2019-03-30 03:59:28.235458532 +0100 +diff -up glibc-2.30/rt/Makefile.59~ glibc-2.30/rt/Makefile +--- glibc-2.30/rt/Makefile.59~ 2019-08-02 14:02:25.635110580 +0200 ++++ glibc-2.30/rt/Makefile 2019-08-02 14:02:25.657110460 +0200 @@ -66,6 +66,8 @@ CFLAGS-mq_timedsend.c += -fexceptions -f CFLAGS-clock_nanosleep.c += -fexceptions -fasynchronous-unwind-tables CFLAGS-librt-cancellation.c += -fasynchronous-unwind-tables @@ -208,9 +206,22 @@ diff -up glibc-2.29/rt/Makefile.omv~ glibc-2.29/rt/Makefile LDFLAGS-rt.so = -Wl,--enable-new-dtags,-z,nodelete $(objpfx)librt.so: $(shared-thread-library) -diff -up glibc-2.29/stdio-common/Makefile.omv~ glibc-2.29/stdio-common/Makefile ---- glibc-2.29/stdio-common/Makefile.omv~ 2019-03-30 01:34:47.071238325 +0100 -+++ glibc-2.29/stdio-common/Makefile 2019-03-30 01:38:08.931284110 +0100 +diff -up glibc-2.30/setjmp/Makefile.59~ glibc-2.30/setjmp/Makefile +--- glibc-2.30/setjmp/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/setjmp/Makefile 2019-08-02 14:02:25.655110470 +0200 +@@ -31,6 +31,9 @@ tests := tst-setjmp jmpbug bug269-setjm + tst-sigsetjmp tst-setjmp-static + tests-static := tst-setjmp-static + ++CFLAGS-sigjmp.c += -fno-strict-aliasing ++CFLAGS-longjmp.c += -fno-strict-aliasing ++CFLAGS-longjmp_chk.c += -fno-strict-aliasing + + include ../Rules + +diff -up glibc-2.30/stdio-common/Makefile.59~ glibc-2.30/stdio-common/Makefile +--- glibc-2.30/stdio-common/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/stdio-common/Makefile 2019-08-02 14:02:25.657110460 +0200 @@ -125,6 +125,10 @@ $(objpfx)tst-%-mem.out: $(objpfx)tst-%.o CFLAGS-vfprintf.c += -Wno-uninitialized @@ -222,9 +233,9 @@ diff -up glibc-2.29/stdio-common/Makefile.omv~ glibc-2.29/stdio-common/Makefile CFLAGS-tmpfile.c += -fexceptions CFLAGS-tmpfile64.c += -fexceptions -diff -up glibc-2.29/sunrpc/Makefile.omv~ glibc-2.29/sunrpc/Makefile ---- glibc-2.29/sunrpc/Makefile.omv~ 2019-03-30 03:41:07.036516482 +0100 -+++ glibc-2.29/sunrpc/Makefile 2019-03-30 03:50:31.416395875 +0100 +diff -up glibc-2.30/sunrpc/Makefile.59~ glibc-2.30/sunrpc/Makefile +--- glibc-2.30/sunrpc/Makefile.59~ 2019-08-01 06:29:31.000000000 +0200 ++++ glibc-2.30/sunrpc/Makefile 2019-08-02 14:02:25.657110460 +0200 @@ -156,6 +156,21 @@ CFLAGS-pmap_rmt.c += -fexceptions CFLAGS-clnt_perr.c += -fexceptions CFLAGS-openchild.c += -fexceptions @@ -247,26 +258,40 @@ diff -up glibc-2.29/sunrpc/Makefile.omv~ glibc-2.29/sunrpc/Makefile $(objpfx)tst-getmyaddr: $(common-objpfx)linkobj/libc.so $(objpfx)tst-xdrmem: $(common-objpfx)linkobj/libc.so $(objpfx)tst-xdrmem2: $(common-objpfx)linkobj/libc.so -diff -up glibc-2.29/support/Makefile.omv~ glibc-2.29/support/Makefile ---- glibc-2.29/support/Makefile.omv~ 2019-03-30 04:00:21.185878611 +0100 -+++ glibc-2.29/support/Makefile 2019-03-30 04:00:35.030986920 +0100 -@@ -169,6 +169,8 @@ CFLAGS-support_paths.c = \ - -DINSTDIR_PATH=\"$(prefix)\" \ - -DLIBDIR_PATH=\"$(libdir)\" +diff -up glibc-2.30/support/Makefile.59~ glibc-2.30/support/Makefile +--- glibc-2.30/support/Makefile.59~ 2019-08-02 14:02:25.658110454 +0200 ++++ glibc-2.30/support/Makefile 2019-08-02 14:03:49.448649403 +0200 +@@ -184,6 +184,8 @@ CFLAGS-support_paths.c = \ + -DSBINDIR_PATH=\"$(sbindir)\" \ + -DROOTSBINDIR_PATH=\"$(rootsbindir)\" +CFLAGS-resolv_test.c = -fno-strict-aliasing + ifeq (,$(CXX)) LINKS_DSO_PROGRAM = links-dso-program-c else -diff -up glibc-2.29/locale/Makefile.omv~ glibc-2.29/locale/Makefile ---- glibc-2.29/locale/Makefile.omv~ 2019-03-30 15:26:20.271041292 +0100 -+++ glibc-2.29/locale/Makefile 2019-03-30 15:26:45.691112618 +0100 -@@ -101,6 +101,7 @@ CPPFLAGS-locale-programs = -DLOCALE_PATH - CFLAGS-charmap.c += -Wno-write-strings -Wno-char-subscripts - CFLAGS-locfile.c += -Wno-write-strings -Wno-char-subscripts - CFLAGS-charmap-dir.c += -Wno-write-strings -+CFLAGS-C-ctype.c += -fno-strict-aliasing +diff -up glibc-2.30/libio/libioP.h.omv~ glibc-2.30/libio/libioP.h +--- glibc-2.30/libio/libioP.h.omv~ 2019-08-03 00:07:22.023320351 +0200 ++++ glibc-2.30/libio/libioP.h 2019-08-03 00:07:47.826180694 +0200 +@@ -842,8 +842,8 @@ extern struct _IO_FILE_plus _IO_stderr_; + static inline bool + _IO_legacy_file (FILE *fp) + { +- return fp == (FILE *) &_IO_stdin_ || fp == (FILE *) &_IO_stdout_ +- || fp == (FILE *) &_IO_stderr_; ++ return (void*)fp == &_IO_stdin_ || (void*)fp == &_IO_stdout_ ++ || (void*)fp == &_IO_stderr_; + } + #endif - # Set libof-* for each routine. - cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \ +@@ -853,8 +853,8 @@ static inline void + _IO_deallocate_file (FILE *fp) + { + /* The current stream variables. */ +- if (fp == (FILE *) &_IO_2_1_stdin_ || fp == (FILE *) &_IO_2_1_stdout_ +- || fp == (FILE *) &_IO_2_1_stderr_) ++ if ((void*)fp == &_IO_2_1_stdin_ || (void*)fp == &_IO_2_1_stdout_ ++ || (void*)fp == &_IO_2_1_stderr_) + return; + #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) + if (_IO_legacy_file (fp)) diff --git a/glibc-gcc-PR69537.patch b/glibc-gcc-PR69537.patch index 9f395d5..acb1423 100644 --- a/glibc-gcc-PR69537.patch +++ b/glibc-gcc-PR69537.patch @@ -1,17 +1,12 @@ -Work around incorrect -Wmaybe-uninitialized warning due to this GCC bug: - - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69537 - -Index: glibc-2.22-709-g8a71d2e/nis/ypclnt.c -=================================================================== ---- glibc-2.22-709-g8a71d2e.orig/nis/ypclnt.c -+++ glibc-2.22-709-g8a71d2e/nis/ypclnt.c -@@ -584,7 +584,7 @@ yp_master (const char *indomain, const c +diff -up glibc-2.30/nis/ypclnt.c.17~ glibc-2.30/nis/ypclnt.c +--- glibc-2.30/nis/ypclnt.c.17~ 2019-08-02 13:54:49.077566424 +0200 ++++ glibc-2.30/nis/ypclnt.c 2019-08-02 13:55:21.850394517 +0200 +@@ -590,7 +590,7 @@ yp_master (const char *indomain, const c { ypreq_nokey req; ypresp_master resp; - enum clnt_stat result; + int result; - if (indomain == NULL || indomain[0] == '\0' || - inmap == NULL || inmap[0] == '\0') + if (indomain == NULL || indomain[0] == '\0' + || inmap == NULL || inmap[0] == '\0') diff --git a/glibc.spec b/glibc.spec index 41e296b..fcb0426 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,5 +1,4 @@ %bcond_with crosscompilers -#% define debug_package %nil %ifarch %{ix86} %{arm} # FIXME add riscv32-linux when glibc starts supporting it # FIXME Determine why (and fix) 32-bit platform to x86_64-linux crosscompilers @@ -17,12 +16,10 @@ done ) -%define x86_64 x86_64 znver1 amd64 em64t - %define _libdir32 %{_prefix}/lib %define _libdirn32 %{_prefix}/lib32 -%define ver 2.29 +%define ver 2.30 %define linaro %{nil} %define oname glibc @@ -83,7 +80,9 @@ # Gemini PDA has 3.18.x %define enablekernel 3.18.0 %else -%define enablekernel 4.14.0 +# (tpg) some popular clouds will fail with error "FATAL: kernel too old" +# when running our docker or building it. Let's be safe and pretend it's 2015. +%define enablekernel 4.0 %endif %endif @@ -103,7 +102,7 @@ %bcond_without locales %if %isarch %{ix86} %{x86_64} -%bcond_with systap +%bcond_without systap %else %bcond_with systap %endif @@ -128,7 +127,7 @@ Source0: http://ftp.gnu.org/gnu/glibc/%{oname}-%{ver}.tar.xz #Source1: http://ftp.gnu.org/gnu/glibc/%{oname}-%{ver}.tar.xz.sig #endif %endif -Release: 16 +Release: 3 License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+ Group: System/Libraries Url: http://www.gnu.org/software/libc/ @@ -207,17 +206,6 @@ Patch101: https://raw.githubusercontent.com/clearlinux-pkgs/glibc/master/nostack # # Taken from git://sourceware.org/git/glibc.git # release branch -Patch500: 0001-nptl-Fix-pthread_rwlock_try-lock-stalls-Bug-23844.patch -Patch501: 0002-x86-64-memcmp-Use-unsigned-Jcc-instructions-on-size-.patch -Patch502: 0003-arm-Use-nr-constraint-for-Systemtap-probes-BZ-24164.patch -Patch503: 0004-Add-compiler-barriers-around-modifications-of-the-ro.patch -Patch504: 0005-nptl-Avoid-fork-handler-lock-for-async-signal-safe-f.patch -Patch505: 0006-nptl-Fix-invalid-Systemtap-probe-in-pthread_join-BZ-.patch -Patch506: 0007-Fix-output-of-LD_SHOW_AUXV-1.patch -Patch507: 0008-regex-fix-read-overrun-BZ-24114.patch -Patch508: 0009-Record-CVE-2019-9169-in-NEWS-and-ChangeLog-BZ-24114.patch -Patch509: 0010-S390-Mark-vx-and-vxe-as-important-hwcap.patch -Patch510: 0011-ja_JP-Change-the-offset-for-Taisho-gan-nen-from-2-to.patch #----------------------------------------------------------------------- # OpenMandriva patches @@ -247,15 +235,14 @@ Patch1034: glibc-2.27-clang-_Float.patch Patch1035: glibc-2.29-aarch64-buildfix.patch Patch1036: glibc-2.29-strict-aliasing.patch Patch1037: glibc-2.29-SIG_BLOCK.patch -Patch1038: unsigned-magic.patch -BuildRequires: devel-rpm-generators BuildRequires: autoconf2.5 +BuildRequires: devel-rpm-generators BuildRequires: python3 BuildRequires: %{cross_prefix}binutils >= 2.30-7 BuildRequires: %{cross_prefix}gcc BuildRequires: gettext -BuildRequires: %{?cross:cross-}kernel-headers >= %{enablekernel} +BuildRequires: kernel-headers >= %{enablekernel} BuildRequires: patch BuildRequires: hardlink BuildRequires: cap-devel @@ -317,6 +304,25 @@ contains the most important sets of shared libraries: the standard C library and the standard math library. Without these two libraries, a Linux system will not function. +%if "%{name}" == "glibc" +%pre -p +-- Check that the running kernel is new enough +required = '%{enablekernel}' +rel = posix.uname("%r") +if rpm.vercmp(rel, required) < 0 then + error("FATAL: kernel too old", 0) +end + +%post -p +os.execute("/usr/sbin/glibc_post_upgrade") + +%transfiletriggerin -p -- /lib/ /lib64/ /usr/lib/ /usr/lib64/ /etc/ld.so.conf.d/ +os.execute("/sbin/ldconfig -X") + +%transfiletriggerpostun -p -- /lib/ /lib64/ /usr/lib/ /usr/lib64/ /etc/ld.so.conf.d/ +os.execute("/sbin/ldconfig -X") +%endif + %if %{with locales} %package -n locales Summary: Base files for localization @@ -527,6 +533,7 @@ LANG variable to their preferred language in their %endif %files -f libc.lang +%if "%{name}" == "glibc" %if %{with timezone} %verify(not md5 size mtime) %config(noreplace) %{_sysconfdir}/localtime %endif @@ -546,6 +553,7 @@ LANG variable to their preferred language in their %{_localedir}/locale.alias /sbin/sln %{_prefix}/libexec/getconf +%endif %if %isarch %{x86_64} %exclude %{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFF32 %exclude %{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFFBIG @@ -576,12 +584,14 @@ LANG variable to their preferred language in their %endif %if %isarch riscv64 %{_slibdir}/ld-linux-riscv64-lp64d.so.1 -%dir %{_slibdir}/lp64d -%dir %{_libdir}/lp64d +/lib/ld-linux-riscv64-lp64d.so.1 +%{_slibdir}/lp64d +%{_libdir}/lp64d %endif %{_slibdir}/lib*-[.0-9]*.so %{_slibdir}/lib*.so.[0-9]* %{_slibdir}/libSegFault.so +%if "%{name}" == "glibc" %dir %{_libdir}/audit %{_libdir}/audit/sotruss-lib.so %dir %{_libdir}/gconv @@ -612,6 +622,7 @@ LANG variable to their preferred language in their %dir %{_var}/cache/ldconfig %ghost %{_var}/cache/ldconfig/aux-cache %{_var}/db/Makefile +%else %if %isarch mips mipsel %if %{build_biarch} %{_slibdir32}/ld-%{fullver}.so @@ -627,6 +638,7 @@ LANG variable to their preferred language in their %{_slibdirn32}/libSegFault.so %endif %endif +%endif ######################################################################## %if %{build_biarch} @@ -637,8 +649,8 @@ Group: System/Libraries Conflicts: glibc < 2.14.90-13 Requires: %{name} = %{EVRD} -%post -n %{multilibc} - %{_sbindir}/iconvconfig %{_libdir32}/gconv -o %{_libdir32}/gconv/gconv-modules.cache +%transfiletriggerin -p -- /usr/lib/gconv/ +os.execute("/usr/sbin/iconvconfig /usr/lib/gconv -o /usr/lib/gconv/gconv-modules.cache") %description -n %{multilibc} The glibc package contains standard libraries which are used by @@ -655,12 +667,15 @@ Linux system will not function. %{_slibdir32}/lib*-[.0-9]*.so %{_slibdir32}/lib*.so.[0-9]* %{_slibdir32}/libSegFault.so +%if "%{name}" == "glibc" %dir %{_libdir32}/audit %{_libdir32}/audit/sotruss-lib.so %dir %{_libdir32}/gconv %{_libdir32}/gconv/*.so %{_libdir32}/gconv/gconv-modules %ghost %{_libdir32}/gconv/gconv-modules.cache +%endif + %{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFF32 %{_prefix}/libexec/getconf/POSIX_V6_ILP32_OFFBIG %{_prefix}/libexec/getconf/POSIX_V7_ILP32_OFF32 @@ -676,7 +691,7 @@ Linux system will not function. Summary: Header and object files for development using standard C libraries Group: Development/C Requires: %{name} = %{EVRD} -#Requires: pkgconfig(libxcrypt) +Requires: pkgconfig(libxcrypt) %if %{build_biarch} Requires: %{multilibc} = %{EVRD} %endif @@ -710,7 +725,9 @@ The glibc-docs package contains docs for %{name}. %exclude %{_docdir}/glibc/COPYING.LIB %files devel +%if "%{name}" == "glibc" %{_infodir}/libc.info* +%endif %{_includedir}/* %{_libdir}/*.o %{_libdir}/*.so @@ -747,31 +764,12 @@ The glibc-docs package contains docs for %{name}. %endif %endif -%if "%{name}" == "glibc" -%pre -p --- Check that the running kernel is new enough -required = '%{enablekernel}' -rel = posix.uname("%r") -if rpm.vercmp(rel, required) < 0 then - error("FATAL: kernel too old", 0) -end - -%post -p -os.execute("/usr/sbin/glibc_post_upgrade") - -%transfiletriggerin -p -- /lib/ /lib64/ /usr/lib/ /usr/lib64/ /etc/ld.so.conf.d/ -os.execute("/sbin/ldconfig -X") - -%transfiletriggerpostun -p -- /lib/ /lib64/ /usr/lib/ /usr/lib64/ /etc/ld.so.conf.d/ -os.execute("/sbin/ldconfig -X") -%endif - #----------------------------------------------------------------------- %package static-devel Summary: Static libraries for GNU C library Group: Development/C Requires: %{name}-devel = %{EVRD} -#Requires: %{_lib}crypt-static-devel >= 4.4.3 +Requires: %{_lib}crypt-static-devel >= 4.4.3 %description static-devel The glibc-static-devel package contains the static libraries necessary @@ -782,7 +780,6 @@ library. %files static-devel %{_libdir}/libBrokenLocale.a %{_libdir}/libanl.a -%{_libdir}/libcrypt.a %{_libdir}/libc.a %{_libdir}/libdl.a %{_libdir}/libm.a @@ -795,7 +792,6 @@ library. %if %{build_biarch} %{_libdir32}/libBrokenLocale.a %{_libdir32}/libanl.a -%{_libdir32}/libcrypt.a %{_libdir32}/libc.a %{_libdir32}/libdl.a %{_libdir32}/libm.a @@ -825,26 +821,22 @@ Group: System/Servers Conflicts: kernel < 2.2.0 BuildRequires: rpm-helper Requires(post): systemd -Requires(pre): shadow-utils +Requires(pre): shadow %description -n nscd Nscd caches name service lookups and can dramatically improve performance with NIS+, and may help with DNS as well. -%pre -n nscd - %_pre_useradd nscd / /sbin/nologin +%pre -n nscd -p +user = os.execute("/usr/bin/getent passwd nscd >/dev/null 2>&1") +if user ~= 0 then + os.execute("/usr/sbin/useradd -r -M -U -s /sbin/nologin -d / -c 'system user for nscd' nscd >/dev/null 2>&1") +end -%post -n nscd - %_post_service nscd - -%preun -n nscd - %_preun_service nscd - -%postun -n nscd - %_postun_userdel nscd - if [ "$1" -ge "1" ]; then - systemctl condrestart nscd > /dev/null 2>&1 || : - fi +%post -n nscd -p +os.execute("/usr/sbin/nscd -i passwd -i group >/dev/null 2>&1") +os.execute("/bin/systemctl preset --now nscd.socket >/dev/null 2>&1") +os.execute("/bin/systemctl preset --now nscd.service >/dev/null 2>&1") %files -n nscd %config(noreplace) %{_sysconfdir}/nscd.conf @@ -946,7 +938,7 @@ These are configuration files that describe possible time zones. %endif %if %{with crosscompilers} -%global kernelver %(rpm -q --qf '%%{version}-%%{release}%%{disttag}' kernel-release-source) +%global kernelver %(rpm -q --qf '%%{version}-%%{release}%%{disttag}' kernel-source) %( for i in %{long_targets}; do [ "$i" = "%{_target_platform}" ] && continue @@ -956,7 +948,7 @@ for i in %{long_targets}; do Summary: Libc for crosscompiling to ${i} Group: Development/Other BuildRequires: cross-${i}-binutils cross-${i}-gcc-bootstrap cross-${i}-kernel-headers -BuildRequires: kernel-release-source +BuildRequires: kernel-source Recommends: cross-${i}-binutils cross-${i}-gcc %description -n ${package} Libc for crosscompiling to ${i} @@ -973,6 +965,12 @@ done %setup -q -n %{source_dir} -a3 %autopatch -p1 +%if %{with selinux} + # XXX kludge to build nscd with selinux support as it added -nostdinc + # so /usr/include/selinux is not found + ln -s %{_includedir}/selinux selinux +%endif + find . -type f -size 0 -o -name "*.orig" -exec rm {} \; # Remove patch backups from files we ship in glibc packages @@ -989,6 +987,10 @@ autoconf #----------------------------------------------------------------------- %build +# qemu hack +%ifarch %{riscv} +export libc_cv_mtls_dialect_gnu2=yes +%endif # ... mkdir -p bin ln -sf %{_bindir}/ld.bfd bin/ld @@ -1013,8 +1015,8 @@ function WithSelinux() { then echo '--with-selinux' else echo '--without-selinux' fi -%else - echo '--without-selinux' + %else + echo '--without-selinux' %endif } @@ -1031,9 +1033,9 @@ function BuildGlibc() { # -Wall is just added to get conditionally %%optflags printed... # cut -flto flag %if %{with lto} - BuildFlags="$(rpm --target ${arch}-%{_target_os} -D '%{optflags} -Wall' -E %%{optflags} | sed -e 's# -fPIC##g' -e 's#-m64##' -e 's#-gdwarf-4##;s#-g##' -e 's#-m[36][24]##' -e 's#-O[s2]#-O3#' -e 's#-Wp,-D_FORTIFY_SOURCE=2##')" + BuildFlags="$(rpm --target ${arch}-%{_target_os} -D '%__common_cflags_with_ssp -Wall' -E %%{optflags} | sed -e 's# -fPIC##g' -e 's#-m64##' -e 's#-gdwarf-4##;s#-g##' -e 's#-m[36][24]##' -e 's#-O[s2]#-O3#')" %else - BuildFlags="$(rpm --target ${arch}-%{_target_os} -D '%{optflags} -Wall' -E %%{optflags} | sed -e 's# -fPIC##g' -e 's#-m64##' -e 's#-gdwarf-4##;s#-g##' -e 's#-flto##' -e 's#-m[36][24]##' -e 's#-O[s2]#-O3#' -e 's#-Wp,-D_FORTIFY_SOURCE=2##')" + BuildFlags="$(rpm --target ${arch}-%{_target_os} -D '%__common_cflags_with_ssp -Wall' -E %%{optflags} | sed -e 's# -fPIC##g' -e 's#-m64##' -e 's#-gdwarf-4##;s#-g##' -e 's#-flto##' -e 's#-m[36][24]##' -e 's#-O[s2]#-O3#')" %endif case $arch in i[3-6]86) @@ -1047,7 +1049,7 @@ function BuildGlibc() { BuildCompFlags="-m32" %endif %ifarch %{ix86} - BuildFlags="$BuildFlags -march=i686 -msse -mfpmath=sse -fasynchronous-unwind-tables -mtune=generic" + BuildFlags="$BuildFlags -march=i686 -msse -mfpmath=sse -fasynchronous-unwind-tables -mtune=generic -mstackrealign" %endif ;; znver1) @@ -1110,7 +1112,7 @@ function BuildGlibc() { # set some extra flags here # (tpg) build with -O3 - BuildFlags="$BuildFlags -Wp,-D_GLIBCXX_ASSERTIONS -DNDEBUG=1 %(echo %{optflags} | sed -e 's#-m[36][24]##g;s#-O[s2]#-O3#g' -e 's#-Wp,-D_FORTIFY_SOURCE=2##')" + BuildFlags="$BuildFlags -Wp,-D_GLIBCXX_ASSERTIONS -DNDEBUG=1 -fstack-clash-protection %(echo %{optflags} |sed -e 's#-m[36][24]##g;s#-O[s2]#-O3#g')" %ifnarch %{arm} # As of gcc 8.3.0, glibc 2.29, using -funwind-tables or -fasynchronous-unwind-tables # on armv7hnl results in a build failure because configure can't find a @@ -1131,8 +1133,7 @@ function BuildGlibc() { fi # XXX: -frecord-gcc-switches makes gold abort with assertion error and gcc segfault :| -# BuildFlags="$(echo $BuildFlags |sed -e 's#-frecord-gcc-switches##g')" - BuildFlags="$(echo $BuildFlags |sed -e 's#-frecordcc-switches##g')" + BuildFlags="$(echo $BuildFlags |sed -e 's#-frecord-gcc-switches##g')" # Do not use direct references against %gs when accessing tls data # XXX make it the default in GCC? (for other non glibc specific usage) @@ -1193,7 +1194,7 @@ function BuildGlibc() { configarch=$arch ;; esac - CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags -Wno-error -fno-strict-aliasing" ARFLAGS="$ARFLAGS --generate-missing-build-notes=yes" LDFLAGS="%{ldflags} -fuse-ld=bfd" ../configure \ + CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags -Wno-error" ARFLAGS="$ARFLAGS --generate-missing-build-notes=yes" LDFLAGS="%{ldflags} -fuse-ld=bfd" ../configure \ --target=$configarch-%{platform} \ --host=$configarch-%{platform} \ $BuildCross \ @@ -1218,13 +1219,13 @@ function BuildGlibc() { $MultiArchFlags \ --enable-kernel=%{enablekernel} \ --with-headers=$KernelHeaders ${1+"$@"} \ - --with-bugurl="https://bugzilla.rosalinux.ru" + --with-bugurl=%{bugurl} # FIXME drop -j1 if the Makefiles ever get fixed for parallel build if [ "$BuildAltArch" = "yes" ]; then - %make -j1 -r all subdir_stubs LIBGD=no + %make_build -j1 -r all subdir_stubs LIBGD=no else - %make -j1 -r all subdir_stubs + %make_build -j1 -r all subdir_stubs fi cd - @@ -1295,13 +1296,13 @@ for i in %{targets}; do # We set CXX to empty to prevent links-dso-program from being built # (it may not work -- if we're using a bootstrap version of gcc, # there's no libstdc++ or libgcc_s) - %make CXX="" LIBGD=no + %make_build CXX="" LIBGD=no cd .. done %endif -# Build main glibc export BIARCH_BUILDING=0 +# Build main glibc BuildGlibc %{target_cpu} export BIARCH_BUILDING=1 @@ -1336,12 +1337,15 @@ export BIARCH_BUILDING=1 esac %endif +%if "%{name}" == "glibc" + # post install wrapper gcc -static -Lbuild-%{target_cpu}-linux %{optflags} -Os %{SOURCE2} -o build-%{target_cpu}-linux/glibc_post_upgrade \ '-DLIBTLS="/%{_lib}/tls/"' \ '-DGCONV_MODULES_DIR="%{_libdir}/gconv"' \ '-DLD_SO_CONF="/etc/ld.so.conf"' \ '-DICONVCONFIG="%{_sbindir}/iconvconfig"' +%endif #----------------------------------------------------------------------- @@ -1372,7 +1376,13 @@ for i in %{long_targets}; do fi echo "===== Installing %{_target_platform} -> $i cross libc =====" cd obj-${i} - %makeinstall_std + + # FIXME as of 2.30, installing the x86_64 -> aarch64 crosscompiler + # fails unless those directories are created first. Should figure + # out what's going on there at some point. + mkdir cstdlib cmath + + %make_install cd .. # We don't need all the bits and pieces with a crosscompiler rm -rf %{buildroot}%{_prefix}/$i/bin %{buildroot}%{_prefix}/$i/sbin %{buildroot}%{_prefix}/$i/var %{buildroot}%{_prefix}/$i/share %{buildroot}%{_prefix}/$i/etc @@ -1418,7 +1428,7 @@ make install_root=%{buildroot} install -C build-%{target_cpu}-linux ;; esac mv %{buildroot}/$ALT_ARCH/$LIB %{buildroot}/$LIB - mv %{buildroot}/$ALT_ARCH/%{_prefix}/libexec/getconf/* %{buildroot}%{_prefix}/libexec/getconf/ + mv %{buildroot}/$ALT_ARCH%{_libexecdir}/getconf/* %{buildroot}%{_prefix}/libexec/getconf/ [ ! -d %{buildroot}%{_prefix}/$LIB/ ] && mkdir -p %{buildroot}%{_prefix}/$LIB/ mv %{buildroot}/$ALT_ARCH%{_prefix}/$LIB/* %{buildroot}%{_prefix}/$LIB/ @@ -1429,8 +1439,10 @@ make install_root=%{buildroot} install -C build-%{target_cpu}-linux done %endif -install -m700 build-%{target_cpu}-linux/glibc_post_upgrade -D %{buildroot}%{_sbindir}/glibc_post_upgrade -sh manpages/Script.sh +%if "%{name}" == "glibc" + install -m700 build-%{target_cpu}-linux/glibc_post_upgrade -D %{buildroot}%{_sbindir}/glibc_post_upgrade + sh manpages/Script.sh +%endif # Install extra glibc libraries function InstallGlibc() { @@ -1499,6 +1511,7 @@ EOF %endif # Include ld.so.conf +%if "%{name}" == "glibc" %if %isarch mips mipsel # needed to get a ldd which understands o32, n32, 64 install -m755 build-%{_target_cpu}-linux/elf/ldd %{buildroot}%{_bindir}/ldd @@ -1524,6 +1537,7 @@ chmod 644 %{buildroot}%{_libdir}/gconv/gconv-modules.cache %endif touch %{buildroot}%{_sysconfdir}/ld.so.cache +%endif # Are we cross-compiling? Strip="strip" @@ -1575,7 +1589,11 @@ xz -0 --text -T0 %{buildroot}%{_docdir}/glibc/ChangeLog install -m 644 timezone/README %{buildroot}%{_docdir}/glibc/README.timezone # Localization +%if "%{name}" == "glibc" %find_lang libc +%else +touch libc.lang +%endif # Remove unpackaged files rm -f %{buildroot}%{_bindir}/rpcgen %{buildroot}%{_mandir}/man1/rpcgen.1* @@ -1652,9 +1670,9 @@ touch %{buildroot}%{_prefix}/lib/locale/locale-archive %endif # Remove stuff we get from libxcrypt -#rm -f %{buildroot}%{_prefix}/*/libcrypt.a %{buildroot}%{_includedir}/crypt.h %{buildroot}/*/libcrypt* %{buildroot}%{_prefix}/*/libcrypt.a +rm -f %{buildroot}%{_prefix}/*/libcrypt.a %{buildroot}%{_includedir}/crypt.h %{buildroot}/*/libcrypt* %{buildroot}%{_prefix}/*/libcrypt.a # remove broken symlink -#rm -f %{buildroot}%{_prefix}/lib/libcrypt.so +rm -f %{buildroot}%{_prefix}/lib/libcrypt.so %ifarch %{aarch64} # Compat symlink -- some versions of ld hardcoded /lib/ld-linux-aarch64.so.1 @@ -1670,6 +1688,9 @@ for d in %{buildroot}%{_libdir} %{buildroot}/%{_lib}; do mkdir -p $d (cd $d && rm -f lp64d; ln -sf . lp64d) done +# Compat symlink -- some versions of ld hardcoded /lib/ld-linux-aarch64.so.1 +# as dynamic loader +ln -s %{_slibdir}/ld-linux-riscv64-lp64d.so.1 %{buildroot}/lib/ld-linux-riscv64-lp64d.so.1 %endif %ifarch %{x86_64} diff --git a/localepkg.sh b/localepkg.sh index db51ed9..e361a99 100644 --- a/localepkg.sh +++ b/localepkg.sh @@ -10,7 +10,6 @@ Summary: Base files for localization ($langname) Group: System/Internationalization Obsoletes: locales < 6:2.19-13 Requires(pre): locales = %{EVRD} -Requires(pre): glibc = %{EVRD} Requires(post,preun): sed Requires(post,preun): grep EOF diff --git a/nsswitch.conf b/nsswitch.conf index d6a49fe..1c17b3f 100644 --- a/nsswitch.conf +++ b/nsswitch.conf @@ -27,6 +27,7 @@ # myhostname Resolves local name # nis or yp Use NIS (NIS version 2), also called YP # nisplus or nis+ Use NIS+ (NIS version 3) +# pgsql Use NetBIOS for host lookups # sss Use SSSD (System Security Services Daemon) # tcb Use TCB for host lookups # tinycdb Use a constant database for user lookups