diff --git a/.abf.yml b/.abf.yml
index e3050e0..d5402f4 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,3 +1,3 @@
sources:
- glibc-f30501ca7557a194a53af22ff5b47b3189c48216.tar.xz: c8a09613b73150d514dfeaf21cc66f4e54cef355
+ glibc-3414b17e9db16c3bc0de5b49555c4f94f155ffc8.tar.xz: b3e362a000e3901874e3f229821e7d775217f1ef
glibc-manpages.tar.bz2: ca54bfb832b703c8e35170fcc1c1f5470b45ff0f
diff --git a/glibc-2.29-strict-aliasing.patch b/glibc-2.29-strict-aliasing.patch
index e34d33a..957c200 100644
--- a/glibc-2.29-strict-aliasing.patch
+++ b/glibc-2.29-strict-aliasing.patch
@@ -1,6 +1,6 @@
-diff -up glibc-2.38/csu/Makefile.63~ glibc-2.38/csu/Makefile
---- glibc-2.38/csu/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/csu/Makefile 2023-10-04 23:39:02.115269934 +0200
+diff -up glibc-2.39/csu/Makefile.34~ glibc-2.39/csu/Makefile
+--- glibc-2.39/csu/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/csu/Makefile 2024-01-31 23:44:39.572509209 +0100
@@ -121,7 +121,7 @@ endif
asm-CPPFLAGS += -I$(objpfx).
@@ -10,9 +10,9 @@ diff -up glibc-2.38/csu/Makefile.63~ glibc-2.38/csu/Makefile
include ../Rules
-diff -up glibc-2.38/debug/Makefile.63~ glibc-2.38/debug/Makefile
---- glibc-2.38/debug/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/debug/Makefile 2023-10-04 23:39:02.115269934 +0200
+diff -up glibc-2.39/debug/Makefile.34~ glibc-2.39/debug/Makefile
+--- glibc-2.39/debug/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/debug/Makefile 2024-01-31 23:44:39.572509209 +0100
@@ -166,6 +166,7 @@ CFLAGS-pread_chk.c += -fexceptions -fasy
CFLAGS-pread64_chk.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-recv_chk.c += -fexceptions -fasynchronous-unwind-tables
@@ -21,10 +21,10 @@ diff -up glibc-2.38/debug/Makefile.63~ glibc-2.38/debug/Makefile
# Need to make sure the settings here override what configure might have
# set up for us, so keep the CFLAGS/CPPFLAGS split logical as the order is:
-diff -up glibc-2.38/inet/Makefile.63~ glibc-2.38/inet/Makefile
---- glibc-2.38/inet/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/inet/Makefile 2023-10-04 23:39:02.115269934 +0200
-@@ -113,6 +113,20 @@ CFLAGS-ifaddrs.c += $(config-cflags-wno-
+diff -up glibc-2.39/inet/Makefile.34~ glibc-2.39/inet/Makefile
+--- glibc-2.39/inet/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/inet/Makefile 2024-01-31 23:44:39.572509209 +0100
+@@ -128,6 +128,20 @@ CFLAGS-ifaddrs.c += $(config-cflags-wno-
CFLAGS-tst-checks-posix.c += -std=c99
CFLAGS-tst-sockaddr.c += -fno-strict-aliasing
@@ -45,9 +45,9 @@ diff -up glibc-2.38/inet/Makefile.63~ glibc-2.38/inet/Makefile
endif
# Install the rpc database file.
-diff -up glibc-2.38/libio/Makefile.63~ glibc-2.38/libio/Makefile
---- glibc-2.38/libio/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/libio/Makefile 2023-10-04 23:39:02.115269934 +0200
+diff -up glibc-2.39/libio/Makefile.34~ glibc-2.39/libio/Makefile
+--- glibc-2.39/libio/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/libio/Makefile 2024-01-31 23:44:39.572509209 +0100
@@ -179,6 +179,18 @@ CFLAGS-putc_u.c += $(config-cflags-wno-i
CFLAGS-iofgets_u.c += $(config-cflags-wno-ignored-attributes)
CFLAGS-iofputs_u.c += $(config-cflags-wno-ignored-attributes)
@@ -67,9 +67,9 @@ diff -up glibc-2.38/libio/Makefile.63~ glibc-2.38/libio/Makefile
# Prevent fortification as these are built with -O0
CFLAGS-tst-bz24051.c += $(no-fortify-source)
-diff -up glibc-2.38/libio/libioP.h.63~ glibc-2.38/libio/libioP.h
---- glibc-2.38/libio/libioP.h.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/libio/libioP.h 2023-10-04 23:39:02.115269934 +0200
+diff -up glibc-2.39/libio/libioP.h.34~ glibc-2.39/libio/libioP.h
+--- glibc-2.39/libio/libioP.h.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/libio/libioP.h 2024-01-31 23:44:39.572509209 +0100
@@ -937,8 +937,8 @@ extern struct _IO_FILE_plus _IO_stderr_;
static inline bool
_IO_legacy_file (FILE *fp)
@@ -92,10 +92,10 @@ diff -up glibc-2.38/libio/libioP.h.63~ glibc-2.38/libio/libioP.h
return;
#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
if (_IO_legacy_file (fp))
-diff -up glibc-2.38/locale/Makefile.63~ glibc-2.38/locale/Makefile
---- glibc-2.38/locale/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/locale/Makefile 2023-10-04 23:39:02.116269942 +0200
-@@ -106,6 +106,7 @@ CPPFLAGS-locale-programs = -DLOCALE_PATH
+diff -up glibc-2.39/locale/Makefile.34~ glibc-2.39/locale/Makefile
+--- glibc-2.39/locale/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/locale/Makefile 2024-01-31 23:44:39.572509209 +0100
+@@ -172,6 +172,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
@@ -103,10 +103,10 @@ diff -up glibc-2.38/locale/Makefile.63~ glibc-2.38/locale/Makefile
# Set libof-* for each routine.
cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \
-diff -up glibc-2.38/misc/Makefile.63~ glibc-2.38/misc/Makefile
---- glibc-2.38/misc/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/misc/Makefile 2023-10-04 23:39:02.116269942 +0200
-@@ -332,6 +332,8 @@ CFLAGS-mmap.op = $(no-stack-protector)
+diff -up glibc-2.39/misc/Makefile.34~ glibc-2.39/misc/Makefile
+--- glibc-2.39/misc/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/misc/Makefile 2024-01-31 23:44:39.572509209 +0100
+@@ -335,6 +335,8 @@ CFLAGS-mmap.op = $(no-stack-protector)
CFLAGS-mmap64.o = $(no-stack-protector)
CFLAGS-mmap64.op = $(no-stack-protector)
@@ -115,9 +115,9 @@ diff -up glibc-2.38/misc/Makefile.63~ glibc-2.38/misc/Makefile
include ../Rules
$(objpfx)libg.a: $(dep-dummy-lib); $(make-dummy-lib)
-diff -up glibc-2.38/nis/Makefile.63~ glibc-2.38/nis/Makefile
---- glibc-2.38/nis/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/nis/Makefile 2023-10-04 23:39:02.116269942 +0200
+diff -up glibc-2.39/nis/Makefile.34~ glibc-2.39/nis/Makefile
+--- glibc-2.39/nis/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/nis/Makefile 2024-01-31 23:44:39.572509209 +0100
@@ -52,6 +52,7 @@ endif # have-GLIBC_2.28
include ../Rules
@@ -126,9 +126,9 @@ diff -up glibc-2.38/nis/Makefile.63~ glibc-2.38/nis/Makefile
libnsl-libc = $(common-objpfx)linkobj/libc.so
# Target-specific variable setting to link objects using deprecated
-diff -up glibc-2.38/nptl/Makefile.63~ glibc-2.38/nptl/Makefile
---- glibc-2.38/nptl/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/nptl/Makefile 2023-10-04 23:39:02.116269942 +0200
+diff -up glibc-2.39/nptl/Makefile.34~ glibc-2.39/nptl/Makefile
+--- glibc-2.39/nptl/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/nptl/Makefile 2024-01-31 23:44:39.572509209 +0100
@@ -263,6 +263,22 @@ CFLAGS-sem_clockwait.c = -fexceptions -f
CFLAGS-futex-internal.c += -fexceptions -fasynchronous-unwind-tables
@@ -152,9 +152,9 @@ diff -up glibc-2.38/nptl/Makefile.63~ glibc-2.38/nptl/Makefile
LDLIBS-tst-once5 = -lstdc++
CFLAGS-tst-thread_local1.o = -std=gnu++11
LDLIBS-tst-thread_local1 = -lstdc++
-diff -up glibc-2.38/nscd/Makefile.63~ glibc-2.38/nscd/Makefile
---- glibc-2.38/nscd/Makefile.63~ 2023-10-04 23:39:01.822267461 +0200
-+++ glibc-2.38/nscd/Makefile 2023-10-04 23:39:02.116269942 +0200
+diff -up glibc-2.39/nscd/Makefile.34~ glibc-2.39/nscd/Makefile
+--- glibc-2.39/nscd/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/nscd/Makefile 2024-01-31 23:44:39.572509209 +0100
@@ -79,6 +79,14 @@ CFLAGS-nscd_gethst_r.c += -fexceptions
CFLAGS-nscd_getai.c += -fexceptions
CFLAGS-nscd_initgroups.c += -fexceptions
@@ -170,10 +170,10 @@ diff -up glibc-2.38/nscd/Makefile.63~ glibc-2.38/nscd/Makefile
ifeq (yesyes,$(have-fpie)$(build-shared))
CFLAGS-nscd += $(pie-ccflag)
endif
-diff -up glibc-2.38/nss/Makefile.63~ glibc-2.38/nss/Makefile
---- glibc-2.38/nss/Makefile.63~ 2023-10-04 23:39:02.116269942 +0200
-+++ glibc-2.38/nss/Makefile 2023-10-04 23:39:46.028646255 +0200
-@@ -237,6 +237,9 @@ $(objpfx)mtrace-tst-nss-gai-hv2-canonnam
+diff -up glibc-2.39/nss/Makefile.34~ glibc-2.39/nss/Makefile
+--- glibc-2.39/nss/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/nss/Makefile 2024-01-31 23:44:39.572509209 +0100
+@@ -520,6 +520,9 @@ $(objpfx)mtrace-tst-nss-gai-hv2-canonnam
$(objpfx)tst-nss-gai-hv2-canonname.mtrace; } > $@; \
$(evaluate-test)
@@ -183,10 +183,10 @@ diff -up glibc-2.38/nss/Makefile.63~ glibc-2.38/nss/Makefile
# Disable DT_RUNPATH on NSS tests so that the glibc internal NSS
# functions can load testing NSS modules via DT_RPATH.
LDFLAGS-tst-nss-test1 = -Wl,--disable-new-dtags
-diff -up glibc-2.38/posix/Makefile.63~ glibc-2.38/posix/Makefile
---- glibc-2.38/posix/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/posix/Makefile 2023-10-04 23:39:02.116269942 +0200
-@@ -589,6 +589,12 @@ CFLAGS-execvp.os = -fomit-frame-pointer
+diff -up glibc-2.39/posix/Makefile.34~ glibc-2.39/posix/Makefile
+--- glibc-2.39/posix/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/posix/Makefile 2024-01-31 23:44:39.572509209 +0100
+@@ -581,6 +581,12 @@ CFLAGS-execvp.os = -fomit-frame-pointer
CFLAGS-execlp.os = -fomit-frame-pointer
CFLAGS-nanosleep.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-fork.c = $(libio-mtsafe) $(config-cflags-wno-ignored-attributes)
@@ -199,9 +199,9 @@ diff -up glibc-2.38/posix/Makefile.63~ glibc-2.38/posix/Makefile
tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
--none random --col --color --colour
-diff -up glibc-2.38/resolv/Makefile.63~ glibc-2.38/resolv/Makefile
---- glibc-2.38/resolv/Makefile.63~ 2023-10-04 23:39:01.901268128 +0200
-+++ glibc-2.38/resolv/Makefile 2023-10-04 23:39:02.116269942 +0200
+diff -up glibc-2.39/resolv/Makefile.34~ glibc-2.39/resolv/Makefile
+--- glibc-2.39/resolv/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/resolv/Makefile 2024-01-31 23:44:39.576509248 +0100
@@ -237,6 +237,18 @@ include ../gen-locales.mk
CFLAGS-res_hconf.c += -fexceptions
@@ -221,9 +221,9 @@ diff -up glibc-2.38/resolv/Makefile.63~ glibc-2.38/resolv/Makefile
# The DNS NSS modules needs the resolver.
$(objpfx)libnss_dns.so: $(objpfx)libresolv.so
-diff -up glibc-2.38/rt/Makefile.63~ glibc-2.38/rt/Makefile
---- glibc-2.38/rt/Makefile.63~ 2023-10-04 23:39:02.093269748 +0200
-+++ glibc-2.38/rt/Makefile 2023-10-04 23:39:02.116269942 +0200
+diff -up glibc-2.39/rt/Makefile.34~ glibc-2.39/rt/Makefile
+--- glibc-2.39/rt/Makefile.34~ 2024-01-31 23:44:39.540508898 +0100
++++ glibc-2.39/rt/Makefile 2024-01-31 23:44:39.576509248 +0100
@@ -100,6 +100,8 @@ CFLAGS-aio_suspend.c += -fexceptions
CFLAGS-mq_timedreceive.c += -fexceptions -fasynchronous-unwind-tables
CFLAGS-mq_timedsend.c += -fexceptions -fasynchronous-unwind-tables
@@ -233,9 +233,9 @@ diff -up glibc-2.38/rt/Makefile.63~ glibc-2.38/rt/Makefile
# Exclude fortified routines from being built with _FORTIFY_SOURCE
routines_no_fortify += \
mq_open \
-diff -up glibc-2.38/setjmp/Makefile.63~ glibc-2.38/setjmp/Makefile
---- glibc-2.38/setjmp/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/setjmp/Makefile 2023-10-04 23:39:02.116269942 +0200
+diff -up glibc-2.39/setjmp/Makefile.34~ glibc-2.39/setjmp/Makefile
+--- glibc-2.39/setjmp/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/setjmp/Makefile 2024-01-31 23:44:39.576509248 +0100
@@ -36,6 +36,10 @@ tests-internal := \
gen-as-const-headers += jmp_buf-macros.sym
@@ -247,10 +247,10 @@ diff -up glibc-2.38/setjmp/Makefile.63~ glibc-2.38/setjmp/Makefile
include ../Rules
# This test messes the stack on purpose, which triggers longjump fortify
-diff -up glibc-2.38/stdio-common/Makefile.63~ glibc-2.38/stdio-common/Makefile
---- glibc-2.38/stdio-common/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/stdio-common/Makefile 2023-10-04 23:39:02.116269942 +0200
-@@ -432,6 +432,10 @@ $(objpfx)tst-errno-manual.out: tst-errno
+diff -up glibc-2.39/stdio-common/Makefile.34~ glibc-2.39/stdio-common/Makefile
+--- glibc-2.39/stdio-common/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/stdio-common/Makefile 2024-01-31 23:44:39.576509248 +0100
+@@ -436,6 +436,10 @@ $(objpfx)tst-errno-manual.out: tst-errno
CFLAGS-vfprintf.c += -Wno-uninitialized
CFLAGS-vfwprintf.c += -Wno-uninitialized
@@ -261,9 +261,9 @@ diff -up glibc-2.38/stdio-common/Makefile.63~ glibc-2.38/stdio-common/Makefile
CFLAGS-tmpfile.c += -fexceptions
CFLAGS-tmpfile64.c += -fexceptions
-diff -up glibc-2.38/sunrpc/Makefile.63~ glibc-2.38/sunrpc/Makefile
---- glibc-2.38/sunrpc/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/sunrpc/Makefile 2023-10-04 23:39:02.116269942 +0200
+diff -up glibc-2.39/sunrpc/Makefile.34~ glibc-2.39/sunrpc/Makefile
+--- glibc-2.39/sunrpc/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/sunrpc/Makefile 2024-01-31 23:44:39.576509248 +0100
@@ -97,6 +97,21 @@ CFLAGS-pmap_rmt.c += -fexceptions
CFLAGS-clnt_perr.c += -fexceptions
CFLAGS-openchild.c += -fexceptions
@@ -286,10 +286,10 @@ diff -up glibc-2.38/sunrpc/Makefile.63~ glibc-2.38/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.38/support/Makefile.63~ glibc-2.38/support/Makefile
---- glibc-2.38/support/Makefile.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/support/Makefile 2023-10-04 23:39:02.116269942 +0200
-@@ -226,6 +226,8 @@ ifeq ($(build-shared),yes)
+diff -up glibc-2.39/support/Makefile.34~ glibc-2.39/support/Makefile
+--- glibc-2.39/support/Makefile.34~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/support/Makefile 2024-01-31 23:44:39.576509248 +0100
+@@ -227,6 +227,8 @@ ifeq ($(build-shared),yes)
libsupport-inhibit-o += .o
endif
@@ -298,15 +298,16 @@ diff -up glibc-2.38/support/Makefile.63~ glibc-2.38/support/Makefile
CFLAGS-support_paths.c = \
-DSRCDIR_PATH=\"`cd .. ; pwd`\" \
-DOBJDIR_PATH=\"`cd $(objpfx)/..; pwd`\" \
-diff -up glibc-2.38/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h.63~ glibc-2.38/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
---- glibc-2.38/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h.63~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h 2023-10-04 23:39:02.116269942 +0200
-@@ -17,6 +17,8 @@
+diff -up glibc-2.39/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h.34~ glibc-2.39/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h
+--- glibc-2.39/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h.34~ 2024-01-31 23:44:39.576509248 +0100
++++ glibc-2.39/sysdeps/powerpc/powerpc32/power4/multiarch/init-arch.h 2024-01-31 23:45:21.024911385 +0100
+@@ -16,6 +16,9 @@
+ . */
#include
-
++
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+
+ #include
+
/* The code checks if _rtld_global_ro was realocated before trying to access
- the dl_hwcap field. The assembly is to make the compiler not optimize the
- test (&_rtld_global_ro != NULL), which is always true in ISO C (but not
diff --git a/glibc.spec b/glibc.spec
index 5e4ce79..cd32c75 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -3,7 +3,7 @@
# Package from the last commit from there
# Only important patches are ported into it
# (instead of applying many commits as patches)
-%define commit f30501ca7557a194a53af22ff5b47b3189c48216
+%define commit 3414b17e9db16c3bc0de5b49555c4f94f155ffc8
%define commit_short %(echo %{commit} | head -c6)
# The test suite should be run after updates, but is very
@@ -36,6 +36,7 @@
%define dont_check_elf_files 1
%define _disable_ld_no_undefined 1
+%global optflags %{optflags} -O3 -Wno-error=stringop-overflow -fno-strict-aliasing -Wformat -Wl,--hash-style=both
%global build_ldflags %{build_ldflags} -Wl,--hash-style=both
%global platform %{_target_vendor}-%{_target_os}%{?_gnu}
@@ -122,11 +123,11 @@ end \
Summary: The GNU libc libraries
Name: %{cross_prefix}%{oname}
Epoch: 6
-Version: 2.38
+Version: 2.40
#Source0: http://ftp.gnu.org/gnu/glibc/%%{oname}-%%{version}.tar.xz
# use ./upd.sh to make a tarball and automatically update Release
Source0: glibc-%{commit}.tar.xz
-Release: 5.git%{commit_short}.1
+Release: 6.git%{commit_short}.1
License: LGPLv2+ and LGPLv2+ with exceptions and GPLv2+
Group: System/Libraries
Url: http://www.gnu.org/software/libc/
@@ -532,7 +533,7 @@ LANG variable to their preferred language in their
%{expand:%(sh %{S:1000} "Chechen" "ce" "ce_RU")}
%{expand:%(sh %{S:1000} "Cherokee" "chr" "chr_US")}
%{expand:%(sh %{S:1000} "Central Kurdish" "ckb" "ckb_IQ")}
-%{expand:%(sh %{S:1000} "Crimean Tatar" "crh" "crh_UA")}
+%{expand:%(sh %{S:1000} "Crimean Tatar" "crh" "crh_UA" "crh_RU")}
%{expand:%(sh %{S:1000} "Czech" "cs" "cs_CZ")}
%{expand:%(sh %{S:1000} "Chuvash" "cv" "cv_RU")}
%{expand:%(sh %{S:1000} "Welsh" "cy" "cy_GB")}
@@ -556,6 +557,7 @@ LANG variable to their preferred language in their
%{expand:%(sh %{S:1000} "Friulan" "fur" "fur_IT")}
%{expand:%(sh %{S:1000} "Frisian" "fy" "fy_DE" "fy_NL")}
%{expand:%(sh %{S:1000} "Irish" "ga" "ga_IE")}
+%{expand:%(sh %{S:1000} "Gawhwali" "gbm" "gbm_IN")}
%{expand:%(sh %{S:1000} "Scottish Gaelic" "gd" "gd_GB")}
%{expand:%(sh %{S:1000} "Galician" "gl" "gl_ES")}
%{expand:%(sh %{S:1000} "Gujarati" "gu" "gu_IN")}
@@ -590,6 +592,7 @@ LANG variable to their preferred language in their
%{expand:%(sh %{S:1000} "Konkani" "kok" "kok_IN")}
%{expand:%(sh %{S:1000} "Kashmiri" "ks" "ks_IN")}
%{expand:%(sh %{S:1000} "Kurdish" "ku" "ku_TR")}
+%{expand:%(sh %{S:1000} "Komi" "kv" "kv_RU")}
%{expand:%(sh %{S:1000} "Cornish" "kw" "kw_GB")}
%{expand:%(sh %{S:1000} "Kyrgyz" "ky" "ky_KG")}
%{expand:%(sh %{S:1000} "Luxembourgish" "lb" "lb_LU")}
@@ -600,12 +603,14 @@ LANG variable to their preferred language in their
%{expand:%(sh %{S:1000} "Laotian" "lo" "lo_LA")}
%{expand:%(sh %{S:1000} "Lithuanian" "lt" "lt_LT")}
%{expand:%(sh %{S:1000} "Latvian" "lv" "lv_LV")}
+%{expand:%(sh %{S:1000} "Latgalian" "ltg" "ltg_LV")}
%{expand:%(sh %{S:1000} "Magahi" "mag" "mag_IN")}
%{expand:%(sh %{S:1000} "Maithili" "mai" "mai_IN" "mai_NP")}
%{expand:%(sh %{S:1000} "Mauritian Creole" "mfe" "mfe_MU")}
%{expand:%(sh %{S:1000} "Malagasy" "mg" "mg_MG")}
%{expand:%(sh %{S:1000} "Mari" "mhr" "mhr_RU")}
%{expand:%(sh %{S:1000} "Maori" "mi" "mi_NZ")}
+%{expand:%(sh %{S:1000} "Moksha" "mdf" "mdf_RU")}
%{expand:%(sh %{S:1000} "Miskito" "miq" "miq_NI")}
%{expand:%(sh %{S:1000} "Karbi" "mjw" "mjw_IN")}
%{expand:%(sh %{S:1000} "Macedonian" "mk" "mk_MK")}
@@ -645,6 +650,7 @@ LANG variable to their preferred language in their
%{expand:%(sh %{S:1000} "Sindhi" "sd" "sd_IN")}
%{expand:%(sh %{S:1000} "Saami" "se" "se_NO")}
%{expand:%(sh %{S:1000} "Samogitian" "sgs" "sgs_LT")}
+%{expand:%(sh %{S:1000} "Sicilian" "scn" "scn_IT")}
%{expand:%(sh %{S:1000} "Shan" "shn" "shn_MM")}
%{expand:%(sh %{S:1000} "Secwepemctsin" "shs" "shs_CA")}
%{expand:%(sh %{S:1000} "Sinhala" "si" "si_LK")}
@@ -652,10 +658,12 @@ LANG variable to their preferred language in their
%{expand:%(sh %{S:1000} "Slovenian" "sl" "sl_SI")}
%{expand:%(sh %{S:1000} "Samoan" "sm" "sm_WS")}
%{expand:%(sh %{S:1000} "Serbian" "sr" "sr_ME" "sr_RS")}
+%{expand:%(sh %{S:1000} "Saho" "ssy" "ssy_ER")}
%{expand:%(sh %{S:1000} "Somali" "so" "so_DJ" "so_ET" "so_KE" "so_SO")}
%{expand:%(sh %{S:1000} "Albanian" "sq" "sq_AL" "sq_MK")}
%{expand:%(sh %{S:1000} "Swati" "ss" "ss_ZA")}
%{expand:%(sh %{S:1000} "Sotho" "st" "st_ZA")}
+%{expand:%(sh %{S:1000} "Sundanese" "su" "su_ID")}
%{expand:%(sh %{S:1000} "Swedish" "sv" "sv_FI" "sv_SE")}
# sw_XX?
%{expand:%(sh %{S:1000} "Swahili" "sw" "sw_KE" "sw_TZ")}
@@ -671,6 +679,7 @@ LANG variable to their preferred language in their
%{expand:%(sh %{S:1000} "Pilipino" "tl" "r:ph" "fil_PH" "tl_PH")}
%{expand:%(sh %{S:1000} "Tswana" "tn" "tn_ZA")}
%{expand:%(sh %{S:1000} "Tonga" "to" "to_TO")}
+%{expand:%(sh %{S:1000} "Toki Pona" "tok")}
%{expand:%(sh %{S:1000} "Turkish" "tr" "tr_CY" "tr_TR")}
%{expand:%(sh %{S:1000} "Tsonga" "ts" "ts_ZA")}
%{expand:%(sh %{S:1000} "Tatar" "tt" "tt_RU")}
@@ -690,6 +699,7 @@ LANG variable to their preferred language in their
%{expand:%(sh %{S:1000} "Yoruba" "yo" "yo_NG")}
%{expand:%(sh %{S:1000} "Yue Chinese (Cantonese)" "yue" "yue_HK")}
%{expand:%(sh %{S:1000} "Yau" "yuw" "yuw_PG")}
+%{expand:%(sh %{S:1000} "Tamazight" "zgh" "zgh_MA")}
%{expand:%(sh %{S:1000} "Chinese" "zh" "zh_CN" "zh_HK" "zh_SG" "zh_TW" "cmn_TW" "hak_TW" "lzh_TW" "nan_TW")}
%{expand:%(sh %{S:1000} "Zulu" "zu" "zu_ZA")}
%endif
@@ -1133,7 +1143,6 @@ autoconf
#-----------------------------------------------------------------------
%build
-%set_build_flags
# qemu hack
%ifarch %{riscv}
export libc_cv_mtls_dialect_gnu2=yes
@@ -1176,7 +1185,7 @@ function BuildGlibc() {
# Select optimization flags and compiler to use
BuildAltArch="no"
BuildCompFlags=""
- BuildFlags=" -O3 -g -Wp,-D_GLIBCXX_ASSERTIONS -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Wformat -Wl,--hash-style=both"
+ BuildFlags="-O2 -g"
case $arch in
i[3-6]86)
%ifarch %{x86_64}
@@ -1189,7 +1198,7 @@ function BuildGlibc() {
BuildCompFlags="-m32"
%endif
%ifarch %{ix86}
- BuildFlags="$BuildFlags -march=i686 -msse -mfpmath=sse -mtune=generic -mstackrealign"
+ BuildFlags="$BuildFlags -march=i686 -msse -mfpmath=sse -fasynchronous-unwind-tables -mtune=generic -mstackrealign"
%endif
;;
znver1)
@@ -1198,17 +1207,6 @@ function BuildGlibc() {
x86_64)
BuildFlags="$BuildFlags -march=x86-64 -mtune=generic"
;;
- mips|mipsel)
- BuildCompFlags="$BuildFlags"
- ;;
- mips32|mips32el)
- BuildFlags="$BuildFlags -march=mips3 -mabi=n32"
- BuildCompFlags="$BuildFlags -march=mips3 -mabi=n32"
- ;;
- mips64|mips64el)
- BuildFlags="$BuildFlags -march=mips3 -mabi=64"
- BuildCompFlags="$BuildFlags -march=mips3 -mabi=64"
- ;;
esac
BuildCompFlags="$BuildCompFlags"
@@ -1223,14 +1221,16 @@ function BuildGlibc() {
# Determine C & C++ compilers
BuildCC="gcc -fuse-ld=bfd $BuildCompFlags"
BuildCXX="g++ -fuse-ld=bfd $BuildCompFlags"
+
+# 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')"
+ BuildFlags="-O2 -g"
+ BuildFlags="-funwind-tables -fasynchronous-unwind-tables $BuildFlags"
BuildFlags="$BuildFlags -fno-lto"
if [ "$arch" = 'i686' ]; then
- # -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
- # is here for Steam bug
- # https://gitlab.archlinux.org/archlinux/rfcs/-/merge_requests/26
- BuildCC="$BuildCC -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
- BuildCXX="$BuildCXX -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
+# Work around https://sourceware.org/ml/libc-alpha/2015-10/msg00745.html
+ BuildCC="$BuildCC -fomit-frame-pointer"
+ BuildCXX="$BuildCXX -fomit-frame-pointer"
fi
# XXX: -frecord-gcc-switches makes gold abort with assertion error and gcc segfault :|
@@ -1258,8 +1258,19 @@ function BuildGlibc() {
fi
%endif
+# enable Memory Tagging Extension (MTE) for aarch64
+ if [ "$arch" = 'aarch64' ]; then
+ ExtraFlags="$ExtraFlags --enable-memory-tagging"
+ fi
+# enable CET Extension (MTE) for aarch64
+ if [ "$arch" = 'x86_64' ]; then
+ ExtraFlags="$ExtraFlags --enable-cet"
+ fi
+
# Add-ons
AddOns="libidn"
+
+ LIB=$(rpm --macros %{_usrlibrpm}/macros:%{_usrlibrpm}/platform/${arch}-%{_target_os}/macros --target=${arch} -E %%{_lib})
LIBDIR=$(rpm --macros %{_usrlibrpm}/macros:%{_usrlibrpm}/platform/${arch}-%{_target_os}/macros --target=${arch} -E %%{_libdir})
# Determine library name
@@ -1290,7 +1301,6 @@ echo CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags -Wno-error" ARFLAGS="$ARF
CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags -Wno-error" ARFLAGS="$ARFLAGS --generate-missing-build-notes=yes" LDFLAGS="%{build_ldflags} -fuse-ld=bfd" ../configure \
--target=$configarch-%{platform} \
--host=$configarch-%{platform} \
- $BuildCross \
--prefix=%{_prefix} \
--bindir=%{_bindir} \
--sbindir=%{_sbindir} \
@@ -1301,12 +1311,6 @@ echo CC="$BuildCC" CXX="$BuildCXX" CFLAGS="$BuildFlags -Wno-error" ARFLAGS="$ARF
--enable-add-ons=$AddOns \
--disable-profile \
--enable-static \
-%ifarch %{x86_64}
- --enable-cet \
-%endif
-%ifarch aarch64
- --enable-memory-tagging \
-%endif
--disable-nss-crypt \
--disable-crypt \
$(WithSelinux) \
diff --git a/reenable_DT_HASH.patch b/reenable_DT_HASH.patch
index 7b7fe9e..2d6d259 100644
--- a/reenable_DT_HASH.patch
+++ b/reenable_DT_HASH.patch
@@ -1,6 +1,6 @@
-diff -up glibc-2.38/Makeconfig.45~ glibc-2.38/Makeconfig
---- glibc-2.38/Makeconfig.45~ 2023-08-01 01:02:58.246719027 +0200
-+++ glibc-2.38/Makeconfig 2023-08-01 01:02:58.303719582 +0200
+diff -up glibc-2.39/Makeconfig.74~ glibc-2.39/Makeconfig
+--- glibc-2.39/Makeconfig.74~ 2024-04-18 16:39:26.102289336 +0200
++++ glibc-2.39/Makeconfig 2024-04-18 16:39:26.162289984 +0200
@@ -381,6 +381,15 @@ relro-LDFLAGS = -Wl,-z,relro
LDFLAGS.so += $(relro-LDFLAGS)
LDFLAGS-rtld += $(relro-LDFLAGS)
@@ -17,11 +17,10 @@ diff -up glibc-2.38/Makeconfig.45~ glibc-2.38/Makeconfig
# Linker options to enable and disable DT_RELR.
ifeq ($(have-dt-relr),yes)
dt-relr-ldflag = -Wl,-z,pack-relative-relocs
-diff -up glibc-2.38/Makerules.45~ glibc-2.38/Makerules
-diff -up glibc-2.38/config.make.in.45~ glibc-2.38/config.make.in
---- glibc-2.38/config.make.in.45~ 2023-08-01 01:02:58.301719562 +0200
-+++ glibc-2.38/config.make.in 2023-08-01 01:03:54.721267748 +0200
-@@ -71,6 +71,7 @@ have-libaudit = @have_libaudit@
+diff -up glibc-2.39/config.make.in.74~ glibc-2.39/config.make.in
+--- glibc-2.39/config.make.in.74~ 2024-01-31 01:34:58.000000000 +0100
++++ glibc-2.39/config.make.in 2024-04-18 16:39:26.162289984 +0200
+@@ -70,6 +70,7 @@ have-libaudit = @have_libaudit@
have-libcap = @have_libcap@
have-cc-with-libunwind = @libc_cv_cc_with_libunwind@
bind-now = @bindnow@
@@ -29,18 +28,18 @@ diff -up glibc-2.38/config.make.in.45~ glibc-2.38/config.make.in
have-cxx-thread_local = @libc_cv_cxx_thread_local@
have-loop-to-function = @libc_cv_cc_loop_to_function@
have-textrel_ifunc = @libc_cv_textrel_ifunc@
-diff -up glibc-2.38/configure.45~ glibc-2.38/configure
---- glibc-2.38/configure.45~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/configure 2023-08-01 01:04:54.904850299 +0200
+diff -up glibc-2.39/configure.74~ glibc-2.39/configure
+--- glibc-2.39/configure.74~ 2024-04-18 16:39:25.826286363 +0200
++++ glibc-2.39/configure 2024-04-18 16:40:52.127216895 +0200
@@ -655,6 +655,7 @@ libc_cv_cc_submachine
libc_cv_cc_nofma
- libc_cv_mtls_dialect_gnu2
+ libc_cv_mtls_descriptor
libc_cv_has_glob_dat
+libc_cv_hashstyle
libc_cv_fpie
libc_cv_z_execstack
ASFLAGS_config
-@@ -7107,6 +7108,32 @@ fi
+@@ -6974,6 +6975,32 @@ fi
printf "%s\n" "$libc_cv_fpie" >&6; }
@@ -73,10 +72,10 @@ diff -up glibc-2.38/configure.45~ glibc-2.38/configure
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GLOB_DAT reloc" >&5
printf %s "checking for GLOB_DAT reloc... " >&6; }
-diff -up glibc-2.38/configure.ac.45~ glibc-2.38/configure.ac
---- glibc-2.38/configure.ac.45~ 2023-07-31 19:54:16.000000000 +0200
-+++ glibc-2.38/configure.ac 2023-08-01 01:02:58.303719582 +0200
-@@ -1339,6 +1339,22 @@ LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpi
+diff -up glibc-2.39/configure.ac.74~ glibc-2.39/configure.ac
+--- glibc-2.39/configure.ac.74~ 2024-04-18 16:39:25.826286363 +0200
++++ glibc-2.39/configure.ac 2024-04-18 16:39:26.166290027 +0200
+@@ -1267,6 +1267,22 @@ LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpi
AC_SUBST(libc_cv_fpie)
diff --git a/upd.sh b/upd.sh
index 42ff2fc..27d57e2 100755
--- a/upd.sh
+++ b/upd.sh
@@ -11,7 +11,7 @@ version="$(grep '^Version:' glibc.spec | awk '{print $NF}')"
[ -n "$version" ]
# get latest available commit (version)
-new_commit="$(git ls-remote git://sourceware.org/git/glibc.git release/2.38/master | awk '{print $1}')"
+new_commit="$(git ls-remote git://sourceware.org/git/glibc.git release/2.40/master | awk '{print $1}')"
[ -n "$new_commit" ]
if [ "$old_commit" = "$new_commit" ]; then
echo "There are no updates"