diff --git a/core/glibc/.checksums b/core/glibc/.checksums index 6800fb5c1..39d77d496 100644 --- a/core/glibc/.checksums +++ b/core/glibc/.checksums @@ -1,5 +1,7 @@ -7199a12f80503cb9c37e82af3bac54b9 PATCH-nscd-Do-not-rebuild-getaddrinfo-bug-30709.patch +6d9f4595a014ca49b2620becc53fce26 fix-malloc-p1.patch +09f61068c014da1c397409e443b184dd fix-malloc-p2.patch cabf312a0adc98de9d52a411b2c14baa genlocales 778cce0ea6bf7f84ca8caacf4a01f45b glibc-2.38.tar.xz f87bc003e02b07545914e38ffd7eede4 ld.so.conf f02419b094ba90195ca922b34a86b0af nsswitch.conf +c7a48a90a1948b5302807856b6ef884a reenable_DT_HASH.patch diff --git a/core/glibc/.pkgfiles b/core/glibc/.pkgfiles index c82c4f9b9..ead91cc3e 100644 --- a/core/glibc/.pkgfiles +++ b/core/glibc/.pkgfiles @@ -1,4 +1,4 @@ -glibc-2.38-1 +glibc-2.38-2 drwxr-xr-x root/root etc/ -rw-r--r-- root/root etc/ld.so.cache -rw-r--r-- root/root etc/ld.so.conf @@ -15,6 +15,7 @@ lrwxrwxrwx root/root lib/ld-linux.so.2 -> ../usr/lib32/ld-linux.so.2 -rwxr-xr-x root/root lib/libanl.so.1 -rwxr-xr-x root/root lib/libc.so.6 -rwxr-xr-x root/root lib/libc_malloc_debug.so.0 +-rwxr-xr-x root/root lib/libcrypt.so.1 -rwxr-xr-x root/root lib/libdl.so.2 -rwxr-xr-x root/root lib/libm.so.6 -rwxr-xr-x root/root lib/libmemusage.so @@ -39,7 +40,7 @@ drwxr-xr-x root/root usr/ drwxr-xr-x root/root usr/bin/ -rwxr-xr-x root/root usr/bin/gencat -rwxr-xr-x root/root usr/bin/genlocales -hrwxr-xr-x root/root usr/bin/getconf link to usr/lib/getconf/POSIX_V7_LP64_OFF64 +-rwxr-xr-x root/root usr/bin/getconf -rwxr-xr-x root/root usr/bin/getent -rwxr-xr-x root/root usr/bin/iconv lrwxrwxrwx root/root usr/bin/ld.so -> ../../lib/ld-linux-x86-64.so.2 @@ -47,6 +48,8 @@ lrwxrwxrwx root/root usr/bin/ld.so -> ../../lib/ld-linux-x86-64.so.2 -rwxr-xr-x root/root usr/bin/locale -rwxr-xr-x root/root usr/bin/localedef -rwxr-xr-x root/root usr/bin/makedb +-rwxr-xr-x root/root usr/bin/memusage +-rwxr-xr-x root/root usr/bin/memusagestat -rwxr-xr-x root/root usr/bin/mtrace -rwxr-xr-x root/root usr/bin/pcprofiledump -rwxr-xr-x root/root usr/bin/pldd @@ -302,6 +305,7 @@ drwxr-xr-x root/root usr/include/bits/types/ -rw-r--r-- root/root usr/include/byteswap.h -rw-r--r-- root/root usr/include/complex.h -rw-r--r-- root/root usr/include/cpio.h +-rw-r--r-- root/root usr/include/crypt.h -rw-r--r-- root/root usr/include/ctype.h -rw-r--r-- root/root usr/include/dirent.h -rw-r--r-- root/root usr/include/dlfcn.h @@ -819,9 +823,9 @@ drwxr-xr-x root/root usr/lib/gconv/gconv-modules.d/ -rwxr-xr-x root/root usr/lib/gconv/libKSC.so -rw-r--r-- root/root usr/lib/gcrt1.o drwxr-xr-x root/root usr/lib/getconf/ -hrwxr-xr-x root/root usr/lib/getconf/POSIX_V6_LP64_OFF64 link to usr/lib/getconf/POSIX_V7_LP64_OFF64 --rwxr-xr-x root/root usr/lib/getconf/POSIX_V7_LP64_OFF64 -hrwxr-xr-x root/root usr/lib/getconf/XBS5_LP64_OFF64 link to usr/lib/getconf/POSIX_V7_LP64_OFF64 +hrwxr-xr-x root/root usr/lib/getconf/POSIX_V6_LP64_OFF64 link to usr/bin/getconf +hrwxr-xr-x root/root usr/lib/getconf/POSIX_V7_LP64_OFF64 link to usr/bin/getconf +hrwxr-xr-x root/root usr/lib/getconf/XBS5_LP64_OFF64 link to usr/bin/getconf -rw-r--r-- root/root usr/lib/grcrt1.o -rw-r--r-- root/root usr/lib/libBrokenLocale.a lrwxrwxrwx root/root usr/lib/libBrokenLocale.so -> ../../lib/libBrokenLocale.so.1 @@ -831,6 +835,8 @@ lrwxrwxrwx root/root usr/lib/libanl.so -> ../../lib/libanl.so.1 -rw-r--r-- root/root usr/lib/libc.so lrwxrwxrwx root/root usr/lib/libc_malloc_debug.so -> ../../lib/libc_malloc_debug.so.0 -rw-r--r-- root/root usr/lib/libc_nonshared.a +-rw-r--r-- root/root usr/lib/libcrypt.a +lrwxrwxrwx root/root usr/lib/libcrypt.so -> ../../lib/libcrypt.so.1 -rw-r--r-- root/root usr/lib/libdl.a -rw-r--r-- root/root usr/lib/libg.a -rw-r--r-- root/root usr/lib/libm-2.38.a @@ -1136,6 +1142,9 @@ lrwxrwxrwx root/root usr/lib32/libanl.so -> libanl.so.1 lrwxrwxrwx root/root usr/lib32/libc_malloc_debug.so -> libc_malloc_debug.so.0 -rwxr-xr-x root/root usr/lib32/libc_malloc_debug.so.0 -rw-r--r-- root/root usr/lib32/libc_nonshared.a +-rw-r--r-- root/root usr/lib32/libcrypt.a +lrwxrwxrwx root/root usr/lib32/libcrypt.so -> libcrypt.so.1 +-rwxr-xr-x root/root usr/lib32/libcrypt.so.1 -rw-r--r-- root/root usr/lib32/libdl.a -rwxr-xr-x root/root usr/lib32/libdl.so.2 -rw-r--r-- root/root usr/lib32/libg.a diff --git a/core/glibc/PATCH-nscd-Do-not-rebuild-getaddrinfo-bug-30709.patch b/core/glibc/PATCH-nscd-Do-not-rebuild-getaddrinfo-bug-30709.patch deleted file mode 100644 index 3eb6f0875..000000000 --- a/core/glibc/PATCH-nscd-Do-not-rebuild-getaddrinfo-bug-30709.patch +++ /dev/null @@ -1,220 +0,0 @@ -From mboxrd@z Thu Jan 1 00:00:00 1970 -Return-Path: -Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) - by sourceware.org (Postfix) with ESMTPS id 5D26B3858D28 - for ; Tue, 1 Aug 2023 14:13:31 +0000 (GMT) -DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5D26B3858D28 -Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com -Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com -DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; - s=mimecast20190719; t=1690899210; - h=from:from:reply-to:subject:subject:date:date:message-id:message-id: - to:to:cc:mime-version:mime-version:content-type:content-type; - bh=V+JHgiMkmVZokr9OzsvqE1BzYrJXvG5qaZBzgKJakQ4=; - b=VhrsRVYC3hPKEhEDGPIA+Q0nD8f+BrWTPkjE4XsI3pS/SeQoRIz4nRl+dFQGtr6xJrmzGb - 8kgmy1w+kHlyRs9UhmBG6fwYlbk8qDVxf/D41VYhEI6WhMJolECPNVUmqcjSYcYb05Itdv - PV0aldwA6xUr3soWj4a3wcHoy9dgK44= -Received: from mimecast-mx02.redhat.com (66.187.233.73 [66.187.233.73]) by - relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, - cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id - us-mta-449-ZVR6yPn8M3CvvwxXwD9rXw-1; Tue, 01 Aug 2023 10:13:28 -0400 -X-MC-Unique: ZVR6yPn8M3CvvwxXwD9rXw-1 -Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) - (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) - (No client certificate requested) - by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4FE4A1C03D8F - for ; Tue, 1 Aug 2023 14:13:28 +0000 (UTC) -Received: from oldenburg.str.redhat.com (unknown [10.2.16.12]) - by smtp.corp.redhat.com (Postfix) with ESMTPS id D398B40C2063 - for ; Tue, 1 Aug 2023 14:13:27 +0000 (UTC) -From: Florian Weimer -To: libc-alpha@sourceware.org -Subject: [PATCH] nscd: Do not rebuild getaddrinfo (bug 30709) -Date: Tue, 01 Aug 2023 16:13:26 +0200 -Message-ID: <87sf924zqx.fsf@oldenburg.str.redhat.com> -User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) -MIME-Version: 1.0 -X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 -X-Mimecast-Spam-Score: 0 -X-Mimecast-Originator: redhat.com -Content-Type: text/plain -X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 -X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org -List-Id: - -The nscd daemon caches hosts data from NSS modules verbatim, without -filtering protocol families or sorting them (otherwise separate caches -would be needed for certain ai_flags combinations). The cache -implementation is complete separate from the getaddrinfo code. This -means that rebuilding getaddrinfo is not needed. The only function -actually used is __bump_nl_timestamp from check_pf.c, and this change -moves it into nscd/connections.c. - -Tested on x86_64-linux-gnu with -fexceptions, built with -build-many-glibcs.py. I also backported this patch into a distribution -that still supports nscd and verified manually that caching still works. - ---- - include/ifaddrs.h | 4 --- - inet/check_pf.c | 9 ------- - nscd/Makefile | 2 +- - nscd/connections.c | 11 +++++++++ - nscd/gai.c | 50 -------------------------------------- - sysdeps/unix/sysv/linux/check_pf.c | 17 +------------ - 6 files changed, 13 insertions(+), 80 deletions(-) - -diff --git a/include/ifaddrs.h b/include/ifaddrs.h -index 416118f1b3..19a3afb19f 100644 ---- a/include/ifaddrs.h -+++ b/include/ifaddrs.h -@@ -34,9 +34,5 @@ extern void __check_native (uint32_t a1_index, int *a1_native, - uint32_t a2_index, int *a2_native) - attribute_hidden; - --#if IS_IN (nscd) --extern uint32_t __bump_nl_timestamp (void) attribute_hidden; --#endif -- - # endif /* !_ISOMAC */ - #endif /* ifaddrs.h */ -diff --git a/inet/check_pf.c b/inet/check_pf.c -index 5310c99121..6d1475920f 100644 ---- a/inet/check_pf.c -+++ b/inet/check_pf.c -@@ -60,12 +60,3 @@ __free_in6ai (struct in6addrinfo *in6ai) - { - /* Nothing to do. */ - } -- -- --#if IS_IN (nscd) --uint32_t --__bump_nl_timestamp (void) --{ -- return 0; --} --#endif -diff --git a/nscd/Makefile b/nscd/Makefile -index 2a0489f4cf..16b6460ee9 100644 ---- a/nscd/Makefile -+++ b/nscd/Makefile -@@ -35,7 +35,7 @@ nscd-modules := nscd connections pwdcache getpwnam_r getpwuid_r grpcache \ - getgrnam_r getgrgid_r hstcache gethstbyad_r gethstbynm3_r \ - getsrvbynm_r getsrvbypt_r servicescache \ - dbg_log nscd_conf nscd_stat cache mem nscd_setup_thread \ -- xmalloc xstrdup aicache initgrcache gai res_hconf \ -+ xmalloc xstrdup aicache initgrcache res_hconf \ - netgroupcache cachedumper - - ifeq ($(build-nscd)$(have-thread-library),yesyes) -diff --git a/nscd/connections.c b/nscd/connections.c -index a405a44a9b..15693e5090 100644 ---- a/nscd/connections.c -+++ b/nscd/connections.c -@@ -256,6 +256,17 @@ int inotify_fd = -1; - #ifdef HAVE_NETLINK - /* Descriptor for netlink status updates. */ - static int nl_status_fd = -1; -+ -+static uint32_t -+__bump_nl_timestamp (void) -+{ -+ static uint32_t nl_timestamp; -+ -+ if (atomic_fetch_add_relaxed (&nl_timestamp, 1) + 1 == 0) -+ atomic_fetch_add_relaxed (&nl_timestamp, 1); -+ -+ return nl_timestamp; -+} - #endif - - /* Number of times clients had to wait. */ -diff --git a/nscd/gai.c b/nscd/gai.c -deleted file mode 100644 -index e29f3fe583..0000000000 ---- a/nscd/gai.c -+++ /dev/null -@@ -1,50 +0,0 @@ --/* Copyright (C) 2004-2023 Free Software Foundation, Inc. -- This file is part of the GNU C Library. -- -- This program is free software; you can redistribute it and/or modify -- it under the terms of the GNU General Public License as published -- by the Free Software Foundation; version 2 of the License, or -- (at your option) any later version. -- -- This program is distributed in the hope that it will be useful, -- but WITHOUT ANY WARRANTY; without even the implied warranty of -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License -- along with this program; if not, see . */ -- --#include --#include -- --/* This file uses the getaddrinfo code but it compiles it without NSCD -- support. We just need a few symbol renames. */ --#define __ioctl ioctl --#define __getsockname getsockname --#define __socket socket --#define __recvmsg recvmsg --#define __bind bind --#define __sendto sendto --#define __strchrnul strchrnul --#define __getline getline --#define __qsort_r qsort_r --/* nscd uses 1MB or 2MB thread stacks. */ --#define __libc_use_alloca(size) (size <= __MAX_ALLOCA_CUTOFF) --#define __getifaddrs getifaddrs --#define __freeifaddrs freeifaddrs --#undef __fstat64 --#define __fstat64 fstat64 --#undef __stat64 --#define __stat64 stat64 -- --/* We are nscd, so we don't want to be talking to ourselves. */ --#undef USE_NSCD -- --#include -- --/* Support code. */ --#include --#include -- --/* Some variables normally defined in libc. */ --nss_action_list __nss_hosts_database attribute_hidden; -diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c -index 2b0b8b6368..3aa6a00348 100644 ---- a/sysdeps/unix/sysv/linux/check_pf.c -+++ b/sysdeps/unix/sysv/linux/check_pf.c -@@ -66,25 +66,10 @@ static struct cached_data *cache; - __libc_lock_define_initialized (static, lock); - - --#if IS_IN (nscd) --static uint32_t nl_timestamp; -- --uint32_t --__bump_nl_timestamp (void) --{ -- if (atomic_fetch_add_relaxed (&nl_timestamp, 1) + 1 == 0) -- atomic_fetch_add_relaxed (&nl_timestamp, 1); -- -- return nl_timestamp; --} --#endif -- - static inline uint32_t - get_nl_timestamp (void) - { --#if IS_IN (nscd) -- return nl_timestamp; --#elif defined USE_NSCD -+#if defined USE_NSCD - return __nscd_get_nl_timestamp (); - #else - return 0; - - diff --git a/testing/glibc/fix-malloc-p1.patch b/core/glibc/fix-malloc-p1.patch similarity index 100% rename from testing/glibc/fix-malloc-p1.patch rename to core/glibc/fix-malloc-p1.patch diff --git a/testing/glibc/fix-malloc-p2.patch b/core/glibc/fix-malloc-p2.patch similarity index 100% rename from testing/glibc/fix-malloc-p2.patch rename to core/glibc/fix-malloc-p2.patch diff --git a/core/glibc/reenable_DT_HASH.patch b/core/glibc/reenable_DT_HASH.patch index f828b011b..87a2329d8 100644 --- a/core/glibc/reenable_DT_HASH.patch +++ b/core/glibc/reenable_DT_HASH.patch @@ -1,145 +1,28 @@ -From e47de5cb2d4dbecb58f569ed241e8e95c568f03c Mon Sep 17 00:00:00 2001 -From: Florian Weimer -Date: Fri, 29 Apr 2022 16:37:51 +0200 -Subject: [PATCH] Do not use --hash-style=both for building glibc shared - objects +From 31915e55f9c34f6137ab1c5ac002375a2d5d4589 Mon Sep 17 00:00:00 2001 +From: Frederik Schwan +Date: Fri, 4 Aug 2023 15:19:57 +0200 +Subject: [PATCH] force --hash-style=both to keep compatibility with old niche + software -The comment indicates that --hash-style=both was used to maintain -compatibility with static dlopen, but we had many internal ABI -changes since then, so this compatiblity does not add value anymore. - -Reviewed-by: Carlos O'Donell --- - Makeconfig | 9 +++++++++ - Makerules | 7 +++++++ - config.make.in | 1 + - configure | 28 ++++++++++++++++++++++++++++ - configure.ac | 16 ++++++++++++++++ - 5 files changed, 61 insertions(+) + Makeconfig | 4 ++++ + 1 file changed, 4 insertions(+) -diff --git b/Makeconfig a/Makeconfig -index 760f14e92f..0aa5fb0099 100644 ---- b/Makeconfig -+++ a/Makeconfig -@@ -362,6 +362,15 @@ relro-LDFLAGS = -Wl,-z,relro +diff --git a/Makeconfig b/Makeconfig +index 77d7fd14df..2ae67c4beb 100644 +--- a/Makeconfig ++++ b/Makeconfig +@@ -378,6 +378,10 @@ relro-LDFLAGS = -Wl,-z,relro LDFLAGS.so += $(relro-LDFLAGS) LDFLAGS-rtld += $(relro-LDFLAGS) -+ifeq (yes,$(have-hash-style)) -+# 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) -+endif + - ifeq (no,$(build-pie-default)) - pie-default = $(no-pie-ccflag) - else # build-pie-default -diff --git b/Makerules a/Makerules -index 354528b8c7..428464f092 100644 ---- b/Makerules -+++ a/Makerules -@@ -557,6 +557,13 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules - -Wl,--verbose 2>/dev/null | \ - sed > $@T \ - -e '/^=========/,/^=========/!d;/^=========/d' \ -+ $(if $(filter yes,$(have-hash-style)), \ -+ -e 's/^.*\.gnu\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ -+ -e '/^[ ]*\.hash[ ]*:.*$$/{h;d;}' \ -+ -e '/DATA_SEGMENT_ALIGN/{H;g}' \ -+ , \ -+ -e 's/^.*\.hash[ ]*:.*$$/ .note.ABI-tag : { *(.note.ABI-tag) } &/' \ -+ ) \ - -e 's/^.*\*(\.dynbss).*$$/& \ - PROVIDE(__start___libc_freeres_ptrs = .); \ - *(__libc_freeres_ptrs) \ -diff --git b/config.make.in a/config.make.in -index fff4c78dd0..bf728c71c0 100644 ---- b/config.make.in -+++ a/config.make.in -@@ -70,6 +70,7 @@ have-libcap = @have_libcap@ - have-cc-with-libunwind = @libc_cv_cc_with_libunwind@ - fno-unit-at-a-time = @fno_unit_at_a_time@ - bind-now = @bindnow@ -+have-hash-style = @libc_cv_hashstyle@ - use-default-link = @use_default_link@ - have-cxx-thread_local = @libc_cv_cxx_thread_local@ - have-loop-to-function = @libc_cv_cc_loop_to_function@ -diff --git b/configure a/configure -index 716dc041b6..5a730dc5fc 100755 ---- b/configure -+++ a/configure -@@ -622,6 +622,7 @@ libc_cv_cc_nofma - libc_cv_mtls_dialect_gnu2 - fno_unit_at_a_time - libc_cv_has_glob_dat -+libc_cv_hashstyle - libc_cv_fpie - libc_cv_z_execstack - ASFLAGS_config -@@ -6193,6 +6194,33 @@ $as_echo "$libc_cv_fpie" >&6; } - - - -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for --hash-style option" >&5 -+$as_echo_n "checking for --hash-style option... " >&6; } -+if ${libc_cv_hashstyle+:} false; then : -+ $as_echo_n "(cached) " >&6 -+else -+ cat > conftest.c <&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; } -+then -+ libc_cv_hashstyle=yes -+else -+ libc_cv_hashstyle=no -+fi -+rm -f conftest* -+fi -+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_hashstyle" >&5 -+$as_echo "$libc_cv_hashstyle" >&6; } -+ -+ - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_DAT reloc" >&5 - $as_echo_n "checking for GLOB_DAT reloc... " >&6; } - if ${libc_cv_has_glob_dat+:} false; then : -diff --git b/configure.ac a/configure.ac -index d08ad4d64e..a045f6608e 100644 ---- b/configure.ac -+++ a/configure.ac -@@ -1360,6 +1360,22 @@ LIBC_TRY_CC_OPTION([-fpie], [libc_cv_fpie=yes], [libc_cv_fpie=no]) - - AC_SUBST(libc_cv_fpie) - -+AC_CACHE_CHECK(for --hash-style option, -+ libc_cv_hashstyle, [dnl -+cat > conftest.c <&AS_MESSAGE_LOG_FD]) -+then -+ libc_cv_hashstyle=yes -+else -+ libc_cv_hashstyle=no -+fi -+rm -f conftest*]) -+AC_SUBST(libc_cv_hashstyle) -+ - AC_CACHE_CHECK(for GLOB_DAT reloc, - libc_cv_has_glob_dat, [dnl - cat > conftest.c < -Date: Fri, 4 Aug 2023 15:19:57 +0200 -Subject: [PATCH] force --hash-style=both to keep compatibility with old niche - software - ---- - Makeconfig | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/Makeconfig b/Makeconfig -index 77d7fd14df..2ae67c4beb 100644 ---- a/Makeconfig -+++ b/Makeconfig -@@ -378,6 +378,10 @@ relro-LDFLAGS = -Wl,-z,relro - LDFLAGS.so += $(relro-LDFLAGS) - LDFLAGS-rtld += $(relro-LDFLAGS) - -+hashstyle-LDFLAGS = -Wl,--hash-style=both -+LDFLAGS.so += $(hashstyle-LDFLAGS) -+LDFLAGS-rtld += $(hashstyle-LDFLAGS) -+ - # Linker options to enable and disable DT_RELR. - ifeq ($(have-dt-relr),yes) - dt-relr-ldflag = -Wl,-z,pack-relative-relocs --- -2.41.0 - diff --git a/testing/glibc/spkgbuild b/testing/glibc/spkgbuild deleted file mode 100644 index b0436172c..000000000 --- a/testing/glibc/spkgbuild +++ /dev/null @@ -1,103 +0,0 @@ -# description : The main C library -# depends : linux-api-headers python3 tzdata - -name=glibc -version=2.38 -release=2 -backup="etc/locales" -source="https://ftp.gnu.org/gnu/$name/$name-$version.tar.xz - genlocales nsswitch.conf ld.so.conf - reenable_DT_HASH.patch - fix-malloc-p1.patch - fix-malloc-p2.patch" -nostrip="lib.*/ld-.*\.so$ - lib.*/libc-.*\.so$ - lib.*/libpthread-.*\.so$ - lib.*/libthread_db-.*\.so$" - -build() { - cd $name-$version - - patch -Np1 -i $SRC/reenable_DT_HASH.patch - patch -Np1 -i $SRC/fix-malloc-p1.patch - patch -Np1 -i $SRC/fix-malloc-p2.patch - - _configure_flag=" - --prefix=/usr \ - --with-headers=/usr/include \ - --disable-profile \ - --disable-werror \ - --enable-crypt \ - --enable-bind-now \ - --enable-kernel=4.14 \ - --enable-stack-protector=strong \ - --enable-multi-arch \ - libc_cv_include_x86_isa_level=no" - - ln -sv lib $PKG/lib64 - - # 64bit - mkdir -v build - cd build - - ../configure \ - --libexecdir=/usr/lib \ - libc_cv_slibdir=/lib \ - ${_configure_flag} - make - - sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile - - make install_root=$PKG install - - # pregenerate C.UTF-8 locale until it is built into glibc - # (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8) - elf/ld.so --library-path "$PWD" locale/localedef -c -f ../localedata/charmaps/UTF-8 -i ../localedata/locales/C ../C.UTF-8/ - - install -d $PKG/var/cache/nscd - install -d $PKG/usr/lib/locale - install -d $PKG/etc/ld.so.conf.d - - install -m644 ../nscd/nscd.conf $PKG/etc - install -m644 $SRC/ld.so.conf $PKG/etc - install -m644 $SRC/nsswitch.conf $PKG/etc - - # supported locales - sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \ - $SRC/glibc-$version/localedata/SUPPORTED >> $PKG/etc/locales - - # locales generator - install -Dm755 $SRC/genlocales $PKG/usr/bin/genlocales - - cp -r ../C.UTF-8 $PKG/usr/lib/locale - sed -i '/#C\.UTF-8 /d' $PKG/etc/locales - - # shipped with tzdata - rm $PKG/usr/bin/zdump - rm $PKG/usr/sbin/zic - rm $PKG/usr/bin/tzselect - - # 32bit - mkdir -v ../build32 - cd ../build32 - export CC="gcc -m32 -mstackrealign" - export CXX="g++ -m32 -mstackrealign" - export CFLAGS="$CFLAGS -Wno-error=parentheses" - ../configure \ - --libdir=/usr/lib32 \ - --libexecdir=/usr/lib32 \ - libc_cv_slibdir=/usr/lib32 \ - i686-pc-linux-gnu \ - ${_configure_flag} - make - make install_root=$PWD/DESTDIR install - install -dm755 $PKG/usr/lib32 - install -dm755 $PKG/usr/include/gnu/ - cp -Rv DESTDIR/usr/lib32/* $PKG/usr/lib32/ - install -m644 DESTDIR/usr/include/gnu/lib-names-32.h \ - DESTDIR/usr/include/gnu/stubs-32.h \ - $PKG/usr/include/gnu/ - ln -sv ../usr/lib32/ld-linux.so.2 $PKG/lib/ld-linux.so.2 - ln -sv ../lib/locale $PKG/usr/lib32/locale - echo "/usr/lib32" > $PKG/etc/ld.so.conf.d/lib32.conf -}