From e1e8467efb0bb185ba523885d8d7aacb17753c49 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Sat, 5 Nov 2022 11:33:12 -0700 Subject: [PATCH] glibc: update to 2.36, first pass, no-cross --- common/shlibs | 60 ++-- ...e-hash-style-both-for-building-glibc.patch | 51 ++++ .../glibc/patches/glibc-c-utf8-locale.patch | 286 ------------------ srcpkgs/glibc/template | 70 ++--- 4 files changed, 112 insertions(+), 355 deletions(-) create mode 100644 srcpkgs/glibc/patches/0001-Revert-Do-not-use-hash-style-both-for-building-glibc.patch delete mode 100644 srcpkgs/glibc/patches/glibc-c-utf8-locale.patch diff --git a/common/shlibs b/common/shlibs index 28feaf77276..e40e0514690 100644 --- a/common/shlibs +++ b/common/shlibs @@ -17,38 +17,38 @@ # one (order top->bottom) is preferred over the next ones. # libc.so musl-1.1.24_7 -libc.so.6 glibc-2.32_1 -libm.so.6 glibc-2.32_1 -libpthread.so.0 glibc-2.32_1 -librt.so.1 glibc-2.32_1 -libdl.so.2 glibc-2.32_1 -ld-linux-x86-64.so.2 glibc-2.32_1 x86_64 -ld-linux.so.2 glibc-2.32_1 i686 -ld-linux.so.3 glibc-2.32_1 armv5tel -ld-linux-aarch64.so.1 glibc-2.32_1 aarch64 -ld64.so.2 glibc-2.32_1 ppc64 -ld.so.1 glibc-2.32_1 mips -ld.so.1 glibc-2.32_1 ppc -ld-linux-armhf.so.3 glibc-2.32_1 -libresolv.so.2 glibc-2.32_1 -libanl.so.1 glibc-2.32_1 -libthread_db.so.1 glibc-2.32_1 -libutil.so.1 glibc-2.32_1 -libnsl.so.1 glibc-2.32_1 -libnss_db.so.2 glibc-2.32_1 -libnss_files.so.2 glibc-2.32_1 -libnss_compat.so.2 glibc-2.32_1 -libnss_dns.so.2 glibc-2.32_1 -libnss_hesiod.so.2 glibc-2.32_1 -libcrypt.so.1 glibc-2.32_1 -libBrokenLocale.so.1 glibc-2.32_1 +libc.so.6 glibc-2.36_1 +libm.so.6 glibc-2.36_1 +libpthread.so.0 glibc-2.36_1 +librt.so.1 glibc-2.36_1 +libdl.so.2 glibc-2.36_1 +ld-linux-x86-64.so.2 glibc-2.36_1 x86_64 +ld-linux.so.2 glibc-2.36_1 i686 +ld-linux.so.3 glibc-2.36_1 armv5tel +ld-linux-aarch64.so.1 glibc-2.36_1 aarch64 +ld64.so.2 glibc-2.36_1 ppc64 +ld.so.1 glibc-2.36_1 mips +ld.so.1 glibc-2.36_1 ppc +ld-linux-armhf.so.3 glibc-2.36_1 +libresolv.so.2 glibc-2.36_1 +libanl.so.1 glibc-2.36_1 +libthread_db.so.1 glibc-2.36_1 +libutil.so.1 glibc-2.36_1 +libnsl.so.1 glibc-2.36_1 +libnss_db.so.2 glibc-2.36_1 +libnss_files.so.2 glibc-2.36_1 +libnss_compat.so.2 glibc-2.36_1 +libnss_dns.so.2 glibc-2.36_1 +libnss_hesiod.so.2 glibc-2.36_1 +libcrypt.so.1 glibc-2.36_1 +libBrokenLocale.so.1 glibc-2.36_1 libSimGearCore.so.2020.3.17 simgear-2020.3.17_1 libSimGearScene.so.2020.3.17 simgear-2020.3.17_1 -libmemusage.so glibc-2.32_1 -libSegFault.so glibc-2.32_1 -libpcprofile.so glibc-2.32_1 -libcidn.so.1 glibc-2.32_1 -libmvec.so.1 glibc-2.32_1 +libmemusage.so glibc-2.36_1 +libSegFault.so glibc-2.36_1 +libpcprofile.so glibc-2.36_1 +libcidn.so.1 glibc-2.36_1 +libmvec.so.1 glibc-2.36_1 libcddgmp.so.0 cddlib-0.94m_1 libcdd.so.0 cddlib-0.94m_1 libz.so.1 zlib-1.2.3_1 diff --git a/srcpkgs/glibc/patches/0001-Revert-Do-not-use-hash-style-both-for-building-glibc.patch b/srcpkgs/glibc/patches/0001-Revert-Do-not-use-hash-style-both-for-building-glibc.patch new file mode 100644 index 00000000000..9c5553e9260 --- /dev/null +++ b/srcpkgs/glibc/patches/0001-Revert-Do-not-use-hash-style-both-for-building-glibc.patch @@ -0,0 +1,51 @@ +Temporary workaround for EAC bug. + +See: https://sourceware.org/bugzilla/show_bug.cgi?id=29456 + +From 8e90e2cc5e57d7ca3a40602d278e9642a8b66716 Mon Sep 17 00:00:00 2001 +From: oreo639 +Date: Tue, 13 Sep 2022 14:30:35 -0700 +Subject: [PATCH] Revert "Do not use --hash-style=both for building glibc + shared objects" + +This reverts commit e47de5cb2d4dbecb58f569ed241e8e95c568f03c. +--- + Makeconfig | 9 +++++++++ + Makerules | 7 +++++++ + 5 files changed, 61 insertions(+) + +diff --git a/Makeconfig b/Makeconfig +index ba70321af1..e2131d4389 100644 +--- a/Makeconfig ++++ b/Makeconfig +@@ -371,6 +371,13 @@ dt-relr-ldflag = + no-dt-relr-ldflag = + endif + ++# For the time being we unconditionally use 'both'. At some time we ++# should declare statically linked code as 'out of luck' and compile ++# with --hash-style=gnu only. ++hashstyle-LDFLAGS = -Wl,--hash-style=both ++LDFLAGS.so += $(hashstyle-LDFLAGS) ++LDFLAGS-rtld += $(hashstyle-LDFLAGS) ++ + ifeq (no,$(build-pie-default)) + pie-default = $(no-pie-ccflag) + else # build-pie-default +diff --git a/Makerules b/Makerules +index d1e139d03c..44134e37ce 100644 +--- a/Makerules ++++ b/Makerules +@@ -558,6 +558,9 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules + -Wl,--verbose 2>/dev/null | \ + sed > $@T \ + -e '/^=========/,/^=========/!d;/^=========/d' \ ++ -e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ ++ -e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \ ++ -e '/DATA_SEGMENT_ALIGN/{H;g}' \ + -e 's/^.*\*(\.dynbss).*$$/& \ + PROVIDE(__start___libc_freeres_ptrs = .); \ + *(__libc_freeres_ptrs) \ +-- +2.37.3 + diff --git a/srcpkgs/glibc/patches/glibc-c-utf8-locale.patch b/srcpkgs/glibc/patches/glibc-c-utf8-locale.patch deleted file mode 100644 index 7215e1558b6..00000000000 --- a/srcpkgs/glibc/patches/glibc-c-utf8-locale.patch +++ /dev/null @@ -1,286 +0,0 @@ -Short description: Add C.UTF-8 support. -Author(s): Fedora glibc team -Origin: PATCH -Upstream status: not-submitted - -This patch needs to upstream as part of Carlos O'Donell -'s work on enabling upstream C.UTF-8 support. This -work is currently blocked on cleaning up the test results to prove that -full code-point sorting is working as intended. - -Note that this patch does not provide full code-point sorting as -expected. - -This patch needs to upstream as soon as possible since it would be nice -to have this in F29 and fixed. - -From 2eda7b462b415105f5a05c1323372d4e39d46439 Mon Sep 17 00:00:00 2001 -From: Mike FABIAN -Date: Mon, 10 Aug 2015 15:58:12 +0200 -Subject: [PATCH] Add a C.UTF-8 locale - ---- - localedata/SUPPORTED | 1 + - localedata/locales/C | 238 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 239 insertions(+) - create mode 100644 localedata/locales/C - -diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED -index 8ca023e..2a78391 100644 ---- a/localedata/SUPPORTED -+++ b/localedata/SUPPORTED -@@ -1,6 +1,7 @@ - # This file names the currently supported and somewhat tested locales. - # If you have any additions please file a glibc bug report. - SUPPORTED-LOCALES=\ -+C.UTF-8/UTF-8 \ - aa_DJ.UTF-8/UTF-8 \ - aa_DJ/ISO-8859-1 \ - aa_ER/UTF-8 \ -diff --git a/localedata/locales/C b/localedata/locales/C -new file mode 100644 -index 0000000..fdf460e ---- /dev/null -+++ b/localedata/locales/C -@@ -0,0 +1,238 @@ -+escape_char / -+comment_char % -+% Locale for C locale in UTF-8 -+ -+LC_IDENTIFICATION -+title "C locale" -+source "" -+address "" -+contact "" -+email "mfabian@redhat.com" -+tel "" -+fax "" -+language "C" -+territory "" -+revision "1.0" -+date "2015-08-10" -+% -+category "i18n:2012";LC_IDENTIFICATION -+category "i18n:2012";LC_CTYPE -+category "i18n:2012";LC_COLLATE -+category "i18n:2012";LC_TIME -+category "i18n:2012";LC_NUMERIC -+category "i18n:2012";LC_MONETARY -+category "i18n:2012";LC_MESSAGES -+category "i18n:2012";LC_PAPER -+category "i18n:2012";LC_NAME -+category "i18n:2012";LC_ADDRESS -+category "i18n:2012";LC_TELEPHONE -+category "i18n:2012";LC_MEASUREMENT -+END LC_IDENTIFICATION -+ -+LC_CTYPE -+copy "i18n" -+ -+translit_start -+include "translit_combining";"" -+translit_end -+ -+END LC_CTYPE -+ -+LC_COLLATE -+order_start forward -+ -+.. -+ -+ -+.. -+ -+ -+.. -+ -+ -+.. -+ -+ -+.. -+ -+ -+.. -+ -+UNDEFINED -+order_end -+END LC_COLLATE -+ -+LC_MONETARY -+% This is the 14652 i18n fdcc-set definition for -+% the LC_MONETARY category -+% (except for the int_curr_symbol and currency_symbol, they are empty in -+% the 14652 i18n fdcc-set definition and also empty in -+% glibc/locale/C-monetary.c. But localedef complains in that case). -+% -+% Using "USD" for int_curr_symbol. But maybe "XXX" would be better? -+% XXX is "No currency" (https://en.wikipedia.org/wiki/ISO_4217) -+int_curr_symbol "" -+% Using "$" for currency_symbol. But maybe would be better? -+% U+00A4 is the "generic currency symbol" -+% (https://en.wikipedia.org/wiki/Currency_sign_%28typography%29) -+currency_symbol "" -+mon_decimal_point "" -+mon_thousands_sep "" -+mon_grouping -1 -+positive_sign "" -+negative_sign "" -+int_frac_digits -1 -+frac_digits -1 -+p_cs_precedes -1 -+int_p_sep_by_space -1 -+p_sep_by_space -1 -+n_cs_precedes -1 -+int_n_sep_by_space -1 -+n_sep_by_space -1 -+p_sign_posn -1 -+n_sign_posn -1 -+% -+END LC_MONETARY -+ -+LC_NUMERIC -+% This is the POSIX Locale definition for -+% the LC_NUMERIC category. -+% -+decimal_point "" -+thousands_sep "" -+grouping -1 -+END LC_NUMERIC -+ -+LC_TIME -+% This is the POSIX Locale definition for -+% the LC_TIME category. -+% -+% Abbreviated weekday names (%a) -+abday "";"";/ -+ "";"";/ -+ "";"";/ -+ "" -+ -+% Full weekday names (%A) -+day "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+ -+% Abbreviated month names (%b) -+abmon "";"";/ -+ "";"";/ -+ "";"";/ -+ "";"";/ -+ "";"";/ -+ "";"" -+ -+% Full month names (%B) -+mon "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "";/ -+ "" -+ -+% Week description, consists of three fields: -+% 1. Number of days in a week. -+% 2. Gregorian date that is a first weekday (19971130 for Sunday, 19971201 for Monday). -+% 3. The weekday number to be contained in the first week of the year. -+% -+% ISO 8601 conforming applications should use the values 7, 19971201 (a -+% Monday), and 4 (Thursday), respectively. -+week 7;19971201;4 -+first_weekday 1 -+first_workday 1 -+ -+% Appropriate date and time representation (%c) -+% "%a %b %e %H:%M:%S %Y" -+d_t_fmt "" -+ -+% Appropriate date representation (%x) -+% "%m/%d/%y" -+d_fmt "" -+ -+% Appropriate time representation (%X) -+% "%H:%M:%S" -+t_fmt "" -+ -+% Appropriate AM/PM time representation (%r) -+% "%I:%M:%S %p" -+t_fmt_ampm "" -+ -+% Equivalent of AM/PM (%p) "AM"/"PM" -+% -+am_pm "";"" -+ -+% Appropriate date representation (date(1)) "%a %b %e %H:%M:%S %Z %Y" -+date_fmt "" -+END LC_TIME -+ -+LC_MESSAGES -+% This is the POSIX Locale definition for -+% the LC_NUMERIC category. -+% -+yesexpr "" -+noexpr "" -+yesstr "" -+nostr "" -+END LC_MESSAGES -+ -+LC_PAPER -+% This is the ISO/IEC 14652 "i18n" definition for -+% the LC_PAPER category. -+% (A4 paper, this is also used in the built in C/POSIX -+% locale in glibc/locale/C-paper.c) -+height 297 -+width 210 -+END LC_PAPER -+ -+LC_NAME -+% This is the ISO/IEC 14652 "i18n" definition for -+% the LC_NAME category. -+% "%p%t%g%t%m%t%f" -+% (also used in the built in C/POSIX locale in glibc/locale/C-name.c) -+name_fmt "/ -+" -+END LC_NAME -+ -+LC_ADDRESS -+% This is the ISO/IEC 14652 "i18n" definition for -+% the LC_ADDRESS category. -+% "%a%N%f%N%d%N%b%N%s %h %e %r%N%C-%z %T%N%c%N" -+% (also used in the built in C/POSIX locale in glibc/locale/C-address.c) -+postal_fmt "/ -+/ -+/ -+/ -+" -+END LC_ADDRESS -+ -+LC_TELEPHONE -+% This is the ISO/IEC 14652 "i18n" definition for -+% the LC_TELEPHONE category. -+% "+%c %a %l" -+tel_int_fmt "/ -+" -+% (also used in the built in C/POSIX locale in glibc/locale/C-telephone.c) -+END LC_TELEPHONE -+ -+LC_MEASUREMENT -+% This is the ISO/IEC 14652 "i18n" definition for -+% the LC_MEASUREMENT category. -+% (same as in the built in C/POSIX locale in glibc/locale/C-measurement.c) -+%metric -+measurement 1 -+END LC_MEASUREMENT -+ --- -2.4.3 - diff --git a/srcpkgs/glibc/template b/srcpkgs/glibc/template index c62a4d2aedf..99f4d41de3f 100644 --- a/srcpkgs/glibc/template +++ b/srcpkgs/glibc/template @@ -1,14 +1,15 @@ # Template file for 'glibc' pkgname=glibc -version=2.32 -revision=2 +version=2.36 +revision=1 +_patchver="72-g0f90d6204d" bootstrap=yes short_desc="GNU C library" maintainer="Enno Boland " license="GPL-2.0-or-later, LGPL-2.1-or-later, BSD-3-Clause" homepage="http://www.gnu.org/software/libc" -distfiles="${GNU_SITE}/glibc/glibc-${version}.tar.xz" -checksum=1627ea54f5a1a8467032563393e0901077626dc66f37f10ee6363bb722222836 +distfiles="https://vasilek.cz/paste/glibc-${version}-${_patchver}.tar.xz" +checksum=656200722d5ba968b4888a2d2950719d72c86290fd0479f61897d25b7db2cb57 # Do not strip these files, objcopy errors out. nostrip_files=" XBS5_ILP32_OFFBIG @@ -20,27 +21,28 @@ nostrip_files=" POSIX_V6_LP64_OFF64 POSIX_V7_LP64_OFF64 XBS5_LP64_OFF64 - ld-${version}.so - libdl-${version}.so - libanl-${version}.so - libcidn-${version}.so - libresolv-${version}.so - libcrypt-${version}.so - libpthread-${version}.so - libm-${version}.so - libutil-${version}.so - libthread_db-1.0.so - librt-${version}.so - libnsl-${version}.so - libc-${version}.so - libBrokenLocale-${version}.so - libnss_compat-${version}.so - libnss_db-${version}.so - libnss_dns-${version}.so - libnss_files-${version}.so - libnss_hesiod-${version}.so - libnss_nisplus-${version}.so - libnss_nis-${version}.so" + ld-linux-x86-64.so.2 + ld-linux.so.2 + ld-linux.so.3 + ld-linux-aarch64.so.1 + ld64.so.2 + ld.so.1 + ld-linux-armhf.so.3 + libresolv.so.2 + libcrypt.so.1 + libm.so.6 + libthread_db.so.1 + libnsl.so.1 + libc.so.6 + libc_malloc_debug.so.0 + libmemusage.so + libmvec.so.1 + libBrokenLocale.so.1 + libnss_compat.so.2 + libnss_db.so.2 + libnss_dns.so.2 + libnss_files.so.2 + libnss_hesiod.so.2" conf_files=" /etc/rpc @@ -52,9 +54,11 @@ fi makedepends="kernel-libc-headers" lib32files="/usr/lib/gconv/gconv-modules" lib32symlinks="ld-linux.so.2" -# There's no point in building this for musl. archs="~*-musl" -nopie=yes +if [ "$XBPS_TARGET_LIBC" = musl ]; then + broken="no point in building this for musl" +fi +nocross=temporarily do_configure() { mkdir build @@ -163,18 +167,6 @@ do_install() { rm -f ${DESTDIR}/usr/bin/z{dump,ic} mv ${DESTDIR}/usr/sbin/* ${DESTDIR}/usr/bin - - # Create xbps.d(5) arch override file for 32-bit architectures - # 32-bit userlands may be used with 64-bit kernels and then - # xbps will report an incorrect architecture by default - case "$XBPS_TARGET_MACHINE" in - i686|ppc|ppcle|armv*) - vmkdir usr/share/xbps.d - echo "architecture=${XBPS_TARGET_MACHINE}" > \ - ${DESTDIR}/usr/share/xbps.d/arch-32bit.conf - ;; - *) ;; - esac } glibc-devel_package() {