diff --git a/0001-fix-glibc-build-error-on-x86.patch b/0001-fix-glibc-build-error-on-x86.patch deleted file mode 100644 index c27dd9ddf83b1a2d8c477a0d6f1c60867522b867..0000000000000000000000000000000000000000 --- a/0001-fix-glibc-build-error-on-x86.patch +++ /dev/null @@ -1,56 +0,0 @@ -From a2150b0d854b6ce3100d7823e3e48b2710161bfc Mon Sep 17 00:00:00 2001 -From: chenhaixiang -Date: Wed, 16 Aug 2023 15:47:44 +0800 -Subject: [PATCH] skipping test case building fix glibc build error on x86 - -Due to the upgrade of binutils to version 2.40, -support for the -z pack-relative-relocs -compilation option was added during glibc building. -This caused the linking failure of the test cases -tst-protected1a, tst-protected1b, and vismain. -These files are only compiled when have-protected-data - is set to 'yes'. -To ensure the successful building of glibc, these files are temporarily skipped. - ---- - elf/Makefile | 19 ------------------- - 1 file changed, 19 deletions(-) - -diff --git a/elf/Makefile b/elf/Makefile -index c00e2ccf..8cd01845 100644 ---- a/elf/Makefile -+++ b/elf/Makefile -@@ -986,30 +986,11 @@ tst-gnu2-tls1mod.so-no-z-defs = yes - CFLAGS-tst-gnu2-tls1mod.c += -mtls-dialect=gnu2 - endif # $(have-mtls-dialect-gnu2) - --ifeq (yes,$(have-protected-data)) --modules-names += tst-protected1moda tst-protected1modb --tests += tst-protected1a tst-protected1b --$(objpfx)tst-protected1a: $(addprefix $(objpfx),tst-protected1moda.so tst-protected1modb.so) --$(objpfx)tst-protected1b: $(addprefix $(objpfx),tst-protected1modb.so tst-protected1moda.so) --tst-protected1modb.so-no-z-defs = yes --# These tests fail with GCC versions prior to 5.1 and with some versions --# of binutils. See https://sourceware.org/bugzilla/show_bug.cgi?id=17709 --# and https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65248 for details. --# Perhaps in future we can make these XFAILs conditional on some detection --# of compiler/linker behavior/version. --test-xfail-tst-protected1a = yes --test-xfail-tst-protected1b = yes --endif - ifeq (yesyes,$(have-fpie)$(build-shared)) - modules-names += tst-piemod1 - tests += tst-pie1 tst-pie2 tst-dlopen-pie tst-dlopen-tlsmodid-pie \ - tst-dlopen-self-pie - tests-pie += tst-pie1 tst-pie2 tst-dlopen-tlsmodid-pie tst-dlopen-self-pie --ifeq (yes,$(have-protected-data)) --tests += vismain --tests-pie += vismain --CFLAGS-vismain.c += $(PIE-ccflag) --endif - endif - modules-execstack-yes = tst-execstack-mod - extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) --- -2.41.0 - diff --git a/glibc.spec b/glibc.spec index 806f703803164f436339290321ebba872c79dae7..b40b3107b689c168d4d53606ad3f86a286ac1fd8 100644 --- a/glibc.spec +++ b/glibc.spec @@ -107,7 +107,6 @@ Patch9016: add-GB18030-2022-charmap-BZ-30243.patch Patch9017: 0001-Optimizing-__random-for-single-threaded-scenarios.patch Patch9018: fix-Segmentation-fault-in-nss-module.patch Patch9019: fix_nss_database_check_reload_and_get_memleak.patch -Patch9020: 0001-fix-glibc-build-error-on-x86.patch %if %{ENABLE_RELOC} Patch9021: reserve-relocation-information-for-sysboost.patch @@ -415,8 +414,8 @@ touch locale/programs/*-kw.h ############################################################################## %build -BuildFlags="-O2 -g -DNDEBUG -fPIC -fPIE -fstack-protector-strong" -LinkFlags="-pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack" +BuildFlags="-O2 -g -DNDEBUG -fPIC -fPIE -fstack-protector-strong -mno-direct-extern-access" +LinkFlags="-pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -mno-direct-extern-access" %ifarch aarch64 BuildFlags="$BuildFlags -mno-outline-atomics" @@ -1300,6 +1299,9 @@ fi %endif %changelog +* Tue Sep 5 2023 chenhaixiang - 2.38-6 +- add the compilation option -mno-direct-extern-access. + * Mon Aug 21 2023 longwei - 2.38-5 - add libc.so relocation file for sysboost