From 4a1755eb7badd0cc1777f210a107bcbef19c827a426dde04a1720675f7f80788 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Wed, 26 Feb 2025 10:45:22 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=734 --- glibc.changes | 11 +++++++++++ glibc.spec | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/glibc.changes b/glibc.changes index f987788..dbe01c3 100644 --- a/glibc.changes +++ b/glibc.changes @@ -103,6 +103,11 @@ Mon Dec 2 14:02:08 UTC 2024 - Andreas Schwab - Add support for loongarch64 +------------------------------------------------------------------- +Wed Oct 9 07:42:01 UTC 2024 - Andreas Schwab + +- Apply libc_nonshared.a workaround also on s390x and ppc64le (bsc#1231051) + ------------------------------------------------------------------- Mon Sep 30 20:56:18 UTC 2024 - Stanislav Brabec @@ -168,6 +173,12 @@ Tue May 28 07:27:01 UTC 2024 - Andreas Schwab - Obsolete glibc-locale-base- from glibc- +------------------------------------------------------------------- +Thu May 23 11:31:34 UTC 2024 - Andreas Schwab + +- Add workaround for invalid use of libc_nonshared.a with non-SUSE libc + (bsc#1221482) + ------------------------------------------------------------------- Tue May 21 09:44:46 UTC 2024 - Andreas Schwab diff --git a/glibc.spec b/glibc.spec index e08236c..bfa039b 100644 --- a/glibc.spec +++ b/glibc.spec @@ -781,6 +781,45 @@ echo 'CFLAGS-.os += -fdump-ipa-clones' \ %endif make %{?_smp_mflags} %{?make_output_sync} + +%if %{build_main} && !0%{?is_opensuse} +%ifarch x86_64 i686 s390x ppc64le +# Horrible workaround for bsc#1221482 +%ifarch x86_64 i686 +archsub=x86 +%endif +%ifarch s390x +archsub=s390 +%endif +%ifarch ppc64le +archsub=powerpc +%endif +xstatbuild () +{ + gcc -O2 -I ../sysdeps/unix/sysv/linux/$archsub -xc - -c -o $1stat$2.oS < +#include +int __$1xstat$2 (int, $3, void *); + +int +$1stat$2 ($3 file, void *buf) +{ + return __$1xstat$2 (_STAT_VER, file, buf); +} +EOF + ar r libc_nonshared.a $1stat$2.oS +} +xstatbuild "" "" "const char *" +xstatbuild f "" int +xstatbuild l "" "const char *" +%ifarch i686 +xstatbuild "" 64 "const char *" +xstatbuild f 64 int +xstatbuild l 64 "const char *" +%endif +%endif +%endif + cd .. #