summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Jung2023-02-12 13:40:18 +0100
committerPeter Jung2023-02-12 13:40:18 +0100
commitb04c29371b602f266b82cff20e89078549aae742 (patch)
treee25403b075b14f91ac5498e925168077e8c0f05c
parent7eac2386794b0f6689acbaac5c0c5ae5c9d7a91c (diff)
downloadaur-b04c29371b602f266b82cff20e89078549aae742.tar.gz
Cleanup && Sync with archlinux
Signed-off-by: Peter Jung <admin@ptr1337.dev>
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD228
-rwxr-xr-x[-rw-r--r--]locale-gen0
-rw-r--r--reenable_DT_HASH.patch145
4 files changed, 237 insertions, 161 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f60cfb75ab27..ec93388fe16e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,8 @@
pkgbase = glibc-git
- pkgver = 2.36.r206.gba0ca36132
+ pkgver = 2.37.r63.ge42ec82219
pkgrel = 1
- url = https://www.gnu.org/software/libc/
+ url = https://www.gnu.org/software/libc
arch = x86_64
- groups = base-git
license = GPL
license = LGPL
makedepends = git
@@ -11,41 +10,41 @@ pkgbase = glibc-git
makedepends = lib32-gcc-libs
makedepends = python
options = staticlibs
+ options = !lto
source = git+https://sourceware.org/git/glibc.git
source = locale.gen.txt
source = locale-gen
source = lib32-glibc.conf
source = sdt.h
source = sdt-config.h
+ source = reenable_DT_HASH.patch
b2sums = SKIP
b2sums = c859bf2dfd361754c9e3bbd89f10de31f8e81fd95dc67b77d10cb44e23834b096ba3caa65fbc1bd655a8696c6450dfd5a096c476b3abf5c7e125123f97ae1a72
b2sums = 04fbb3b0b28705f41ccc6c15ed5532faf0105370f22133a2b49867e790df0491f5a1255220ff6ebab91a462f088d0cf299491b3eb8ea53534cb8638a213e46e3
b2sums = 7c265e6d36a5c0dff127093580827d15519b6c7205c2e1300e82f0fb5b9dd00b6accb40c56581f18179c4fbbc95bd2bf1b900ace867a83accde0969f7b609f8a
b2sums = a6a5e2f2a627cc0d13d11a82458cfd0aa75ec1c5a3c7647e5d5a3bb1d4c0770887a3909bfda1236803d5bc9801bfd6251e13483e9adf797e4725332cd0d91a0e
b2sums = 214e995e84b342fe7b2a7704ce011b7c7fc74c2971f98eeb3b4e677b99c860addc0a7d91b8dc0f0b8be7537782ee331999e02ba48f4ccc1c331b60f27d715678
+ b2sums = 5fdd133c367af2f5454ea1eea7907de12166fb95eb59dbe33eae16aa9e26209b6585972bc1c80e36a0af4bfb04296acaf940ee78cd624cdcbab9669dff46c051
pkgname = glibc-git
- pkgdesc = GNU C Library - git version
+ pkgdesc = GNU C Library (git version)
install = glibc-git.install
- depends = linux-api-headers>=5.18.15
+ depends = linux-api-headers>=5.15
depends = tzdata
depends = filesystem
optdepends = gd: for memusagestat
optdepends = perl: for mtrace
- provides = glibc=2.36
+ provides = glibc=2.37
conflicts = glibc
- options = staticlibs
- options = !strip
backup = etc/gai.conf
backup = etc/locale.gen
backup = etc/nscd.conf
pkgname = lib32-glibc-git
- pkgdesc = GNU C Library (32-bit) - git version
- depends = glibc=2.36
- optdepends = perl: for mtrace
- provides = lib32-glibc=2.36
+ pkgdesc = GNU C Library (32-bit) (git version)
+ depends = glibc-git=2.37.r63.ge42ec82219
+ provides = lib32-glibc=2.37
conflicts = lib32-glibc
options = staticlibs
+ options = !lto
options = !emptydirs
- options = !strip
diff --git a/PKGBUILD b/PKGBUILD
index 16448ca9f231..6c59d48dc8b9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,3 +1,4 @@
+# Maintainer: Peter Jung ptr1337 <admin@ptr1337.dev>
# Maintainer: Niko Cantero <vextium at gmail dot com>
# Contributor: Eli Schwartz <eschwartz@archlinux.org>
# Contributor: Earnestly <zibeon@googlemail.com>
@@ -8,92 +9,67 @@
# Contributor: Dakkshesh <dakkshesh5 at gmail dot com>
# Contributor: Cyber Knight <cyberknight755 at gmail dot com>
-# toolchain build order: linux-api-headers->glibc(-git)->binutils->gcc->glibc(-git)->binutils->gcc
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
# NOTE: valgrind requires rebuilt with each major glibc version
-_pkgname='glibc'
-_kernelver='5.18.15'
-pkgbase="${_pkgname}"-git
-pkgname=("${_pkgname}"-git lib32-"${_pkgname}"-git)
-pkgver=2.36.r206.gba0ca36132
+pkgbase=glibc-git
+pkgname=(glibc-git lib32-glibc-git)
+pkgver=2.37.r63.ge42ec82219
pkgrel=1
-arch=('x86_64')
-url='https://www.gnu.org/software/libc/'
-license=('GPL' 'LGPL')
-groups=('base-git')
-makedepends=('git' 'gd' 'lib32-gcc-libs' 'python')
-options=('staticlibs')
-source=('git+https://sourceware.org/git/glibc.git'
- 'locale.gen.txt'
- 'locale-gen'
- 'lib32-glibc.conf'
- 'sdt.h'
- 'sdt-config.h')
+arch=(x86_64)
+url='https://www.gnu.org/software/libc'
+license=(GPL LGPL)
+makedepends=(git gd lib32-gcc-libs python)
+options=(staticlibs !lto)
+source=(git+https://sourceware.org/git/glibc.git
+ locale.gen.txt
+ locale-gen
+ lib32-glibc.conf
+ sdt.h sdt-config.h
+ reenable_DT_HASH.patch
+)
b2sums=('SKIP'
- 'c859bf2dfd361754c9e3bbd89f10de31f8e81fd95dc67b77d10cb44e23834b096ba3caa65fbc1bd655a8696c6450dfd5a096c476b3abf5c7e125123f97ae1a72'
- '04fbb3b0b28705f41ccc6c15ed5532faf0105370f22133a2b49867e790df0491f5a1255220ff6ebab91a462f088d0cf299491b3eb8ea53534cb8638a213e46e3'
- '7c265e6d36a5c0dff127093580827d15519b6c7205c2e1300e82f0fb5b9dd00b6accb40c56581f18179c4fbbc95bd2bf1b900ace867a83accde0969f7b609f8a'
- 'a6a5e2f2a627cc0d13d11a82458cfd0aa75ec1c5a3c7647e5d5a3bb1d4c0770887a3909bfda1236803d5bc9801bfd6251e13483e9adf797e4725332cd0d91a0e'
- '214e995e84b342fe7b2a7704ce011b7c7fc74c2971f98eeb3b4e677b99c860addc0a7d91b8dc0f0b8be7537782ee331999e02ba48f4ccc1c331b60f27d715678')
+ 'c859bf2dfd361754c9e3bbd89f10de31f8e81fd95dc67b77d10cb44e23834b096ba3caa65fbc1bd655a8696c6450dfd5a096c476b3abf5c7e125123f97ae1a72'
+ '04fbb3b0b28705f41ccc6c15ed5532faf0105370f22133a2b49867e790df0491f5a1255220ff6ebab91a462f088d0cf299491b3eb8ea53534cb8638a213e46e3'
+ '7c265e6d36a5c0dff127093580827d15519b6c7205c2e1300e82f0fb5b9dd00b6accb40c56581f18179c4fbbc95bd2bf1b900ace867a83accde0969f7b609f8a'
+ 'a6a5e2f2a627cc0d13d11a82458cfd0aa75ec1c5a3c7647e5d5a3bb1d4c0770887a3909bfda1236803d5bc9801bfd6251e13483e9adf797e4725332cd0d91a0e'
+ '214e995e84b342fe7b2a7704ce011b7c7fc74c2971f98eeb3b4e677b99c860addc0a7d91b8dc0f0b8be7537782ee331999e02ba48f4ccc1c331b60f27d715678'
+ '5fdd133c367af2f5454ea1eea7907de12166fb95eb59dbe33eae16aa9e26209b6585972bc1c80e36a0af4bfb04296acaf940ee78cd624cdcbab9669dff46c051')
+
+pkgver() {
+ cd glibc
+ # Removes .9000 tag from glibc pkgver.
+ git describe --exclude '*.*.9000' | sed 's/^glibc-//; s/-/.r/; s/-/./'
+}
prepare() {
mkdir -p glibc-build lib32-glibc-build
[[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc
cd glibc
-}
-pkgver() {
- cd glibc
- # Removes .9000 tag from glibc pkgver.
- git describe --exclude '*.*.9000' | sed 's/^glibc-//; s/-/.r/; s/-/./'
+ # Re-enable `--hash-style=both` for building shared objects due to issues with EPIC's EAC
+ # which relies on DT_HASH to be present in these libs.
+ # reconsider 2023-01
+ patch -Np1 -i "${srcdir}"/reenable_DT_HASH.patch
}
build() {
- local _configure_flags=(
- --prefix=/usr
- --with-headers=/usr/include
- --with-bugurl=https://bugs.archlinux.org/
- --enable-memory-tagging
- --enable-bind-now
- --enable-cet
- --enable-kernel="${_kernelver}"
- --enable-multi-arch
- --enable-stack-protector=strong
- --enable-systemtap
- --disable-crypt
- --disable-profile
- --disable-werror
+ local _configure_flags=(
+ --prefix=/usr
+ --with-headers=/usr/include
+ --with-bugurl=https://bugs.archlinux.org/
+ --enable-bind-now
+ --enable-cet
+ --enable-kernel=5.15
+ --enable-multi-arch
+ --enable-stack-protector=strong
+ --enable-systemtap
+ --disable-crypt
+ --disable-profile
+ --disable-werror
)
- unset_flags() {
- unset CFLAGS
- unset CXXFLAGS
- }
-
- configparms_fortify_source() {
- echo "CFLAGS += -Wp,-D_FORTIFY_SOURCE=2" >> configparms
- }
-
- configparms_enable_programs() {
- sed -i "/build-programs=/s#no#yes#" configparms
- }
-
- configparms_disable_programs() {
- echo "build-programs=no" >> configparms
- }
-
- make_build_64 () {
- make -O CFLAGS="$MAKE_FLAGS_64_FULL" CXXFLAGS="$MAKE_FLAGS_64_FULL" -j$(nproc --all)
- }
-
- make_build_32 () {
- make -O CFLAGS="$MAKE_FLAGS_32_FULL" CXXFLAGS="$MAKE_FLAGS_32_FULL" -j$(nproc --all)
- }
-
- MAKE_FLAGS_64="-O2 -pipe"
- MAKE_FLAGS_32="-mno-tls-direct-seg-refs -O2 -pipe"
-
cd "${srcdir}"/glibc-build
echo "slibdir=/usr/lib" >> configparms
@@ -101,30 +77,27 @@ build() {
echo "sbindir=/usr/bin" >> configparms
echo "rootsbindir=/usr/bin" >> configparms
- # Credits @dakkshesh07 & @cyberknight777
- # https://github.com/Neutron-Toolchains/glibc-pkgbuild/blob/main/PKGBUILD
- # remove fortify for building libraries & configure glibc (64-bit) to point at lib directories
- unset_flags
+ # Credits @allanmcrae
+ # https://github.com/allanmcrae/toolchain/blob/f18604d70c5933c31b51a320978711e4e6791cf1/glibc/PKGBUILD
+ # remove fortify for building libraries
+ CFLAGS=${CFLAGS/-Wp,-D_FORTIFY_SOURCE=2/}
+
"${srcdir}"/glibc/configure \
- --host=x86_64-pc-linux-gnu \
--libdir=/usr/lib \
--libexecdir=/usr/lib \
"${_configure_flags[@]}"
# build libraries with fortify disabled
- configparms_disable_programs
- MAKE_FLAGS_64_FULL="$MAKE_FLAGS_64 -U_FORTIFY_SOURCE -ffunction-sections -fdata-sections"
- make_build_64
+ echo "build-programs=no" >> configparms
+ make -O
# re-enable fortify for programs
- configparms_enable_programs
- unset_flags
- configparms_fortify_source
- MAKE_FLAGS_64_FULL="$MAKE_FLAGS_64 -Wp,-D_FORTIFY_SOURCE=2 -ffunction-sections -fdata-sections"
- make_build_64
+ sed -i "/build-programs=/s#no#yes#" configparms
+ echo "CFLAGS += -Wp,-D_FORTIFY_SOURCE=2" >> configparms
+ make -O
# build info pages manually for reproducibility
- make info -j$(nproc --all)
+ make info
cd "${srcdir}"/lib32-glibc-build
export CC="gcc -m32 -mstackrealign"
@@ -134,9 +107,7 @@ build() {
echo "rtlddir=/usr/lib32" >> configparms
echo "sbindir=/usr/bin" >> configparms
echo "rootsbindir=/usr/bin" >> configparms
-
- # remove fortify for building libraries & configure glibc (32-bit) to point at lib directories
- unset_flags
+
"${srcdir}"/glibc/configure \
--host=i686-pc-linux-gnu \
--libdir=/usr/lib32 \
@@ -144,16 +115,13 @@ build() {
"${_configure_flags[@]}"
# build libraries with fortify disabled
- configparms_disable_programs
- MAKE_FLAGS_32_FULL="$MAKE_FLAGS_32 -U_FORTIFY_SOURCE -ffunction-sections -fdata-sections"
- make_build_32
+ echo "build-programs=no" >> configparms
+ make -O
# re-enable fortify for programs
- configparms_enable_programs
- unset_flags
- configparms_fortify_source
- MAKE_FLAGS_32_FULL="$MAKE_FLAGS_32 -Wp,-D_FORTIFY_SOURCE=2 -ffunction-sections -fdata-sections"
- make_build_32
+ sed -i "/build-programs=/s#no#yes#" configparms
+ echo "CFLAGS += -Wp,-D_FORTIFY_SOURCE=2" >> configparms
+ make -O
# pregenerate C.UTF-8 locale until it is built into glibc
# (https://sourceware.org/glibc/wiki/Proposals/C.UTF-8, FS#74864)-
@@ -194,19 +162,18 @@ check() {
}
package_glibc-git() {
- pkgdesc='GNU C Library - git version'
- depends=("linux-api-headers>=${_kernelver}" 'tzdata' 'filesystem')
+ pkgdesc='GNU C Library (git version)'
+ depends=('linux-api-headers>=5.15' tzdata filesystem)
optdepends=('gd: for memusagestat'
'perl: for mtrace')
# XXX Arch Linux's valgrind package requires an exact version
- provides=("${_pkgname}=${pkgver%%.r*}")
- conflicts=("${_pkgname}")
+ provides=("glibc=${pkgver%%.r*}")
+ conflicts=("glibc")
install=glibc-git.install
- backup=('etc/gai.conf'
- 'etc/locale.gen'
- 'etc/nscd.conf')
-
- # We generate these in the post-install with ldconfig -r
+ backup=(etc/gai.conf
+ etc/locale.gen
+ etc/nscd.conf)
+
make -C glibc-build install_root="${pkgdir}" install
rm -f "${pkgdir}"/etc/ld.so.cache
@@ -220,16 +187,16 @@ package_glibc-git() {
install -m644 nscd/nscd.service "${pkgdir}"/usr/lib/systemd/system
install -m644 nscd/nscd.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/nscd.conf
install -dm755 "${pkgdir}"/var/db/nscd
-
+
install -m644 posix/gai.conf "${pkgdir}"/etc/gai.conf
- install -m755 "${srcdir}"/locale-gen "${pkgdir}"/usr/bin
+ install -m755 "${srcdir}"/locale-gen "${pkgdir}"/usr/bin
# Create /etc/locale.gen
install -m644 "${srcdir}"/locale.gen.txt "${pkgdir}"/etc/locale.gen
sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
"${srcdir}"/glibc/localedata/SUPPORTED >> "${pkgdir}"/etc/locale.gen
-
+
# Add SUPPORTED file to pkg
sed -e '1,3d' -e 's|/| |g' -e 's| \\||g' \
"${srcdir}"/glibc/localedata/SUPPORTED > "${pkgdir}"/usr/share/i18n/SUPPORTED
@@ -238,24 +205,7 @@ package_glibc-git() {
install -dm755 "${pkgdir}"/usr/lib/locale
cp -r "${srcdir}"/C.UTF-8 -t "${pkgdir}"/usr/lib/locale
sed -i '/#C\.UTF-8 /d' "${pkgdir}"/etc/locale.gen
-
- # handle selectively stripping unless debug packages are requested
- if check_option 'debug' n; then
- options+=('!strip')
- # I use 2> /dev/null for all of these due to many false-positives as it
- # attempts to strip scripts or other unstrippable files.
- find "$pkgdir"/usr/bin -type f -executable -exec strip $STRIP_BINARIES {} + 2> /dev/null || true
- find "$pkgdir"/usr/lib -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true
-
- # Do not strip these for gdb and valgrind functionality.
- find "$pkgdir"/usr/lib \
- -not -name 'ld-*.so' \
- -not -name 'libc-*.so' \
- -not -name 'libpthread-*.so' \
- -not -name 'libthread_db-*.so' \
- -name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true
- fi
-
+
# Provide tracing probes to libstdc++ for exceptions, possibly for other
# libraries too. Useful for gdb's catch command.
install -Dm644 "${srcdir}"/sdt.h "${pkgdir}"/usr/include/sys/sdt.h
@@ -263,13 +213,12 @@ package_glibc-git() {
}
package_lib32-glibc-git() {
- pkgdesc='GNU C Library (32-bit) - git version'
- depends=("${_pkgname}=${pkgver%%.r*}")
- optdepends=('perl: for mtrace')
- # XXX Arch Linux's valgrind package requires an exact version
- provides=("lib32-${_pkgname}=${pkgver%%.r*}")
- conflicts=("lib32-${_pkgname}")
+ pkgdesc='GNU C Library (32-bit) (git version)'
+ depends=("glibc-git=$pkgver")
options+=('!emptydirs')
+ # XXX Arch Linux's valgrind package requires an exact version
+ provides=("lib32-glibc=${pkgver%%.r*}")
+ conflicts=("lib32-glibc")
cd lib32-glibc-build
@@ -288,21 +237,4 @@ package_lib32-glibc-git() {
# Symlink /usr/lib32/locale to /usr/lib/locale
ln -s ../lib/locale "${pkgdir}"/usr/lib32/locale
-
- # handle selectively stripping unless debug packages are requested
- if check_option 'debug' n; then
- options+=('!strip')
- # I use 2> /dev/null for all of these due to many false-positives as it
- # attempts to strip scripts or other unstrippable files.
- find "$pkgdir"/usr/bin -type f -executable -exec strip $STRIP_BINARIES {} + 2> /dev/null || true
- find "$pkgdir"/usr/lib32 -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true
-
- # Do not strip these for gdb and valgrind functionality.
- find "$pkgdir"/usr/lib32 \
- -not -name 'ld-*.so' \
- -not -name 'libc-*.so' \
- -not -name 'libpthread-*.so' \
- -not -name 'libthread_db-*.so' \
- -name '*-*.so' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true
- fi
}
diff --git a/locale-gen b/locale-gen
index ee88880705a5..ee88880705a5 100644..100755
--- a/locale-gen
+++ b/locale-gen
diff --git a/reenable_DT_HASH.patch b/reenable_DT_HASH.patch
new file mode 100644
index 000000000000..f828b011bd9f
--- /dev/null
+++ b/reenable_DT_HASH.patch
@@ -0,0 +1,145 @@
+From e47de5cb2d4dbecb58f569ed241e8e95c568f03c Mon Sep 17 00:00:00 2001
+From: Florian Weimer <fweimer@redhat.com>
+Date: Fri, 29 Apr 2022 16:37:51 +0200
+Subject: [PATCH] Do not use --hash-style=both for building glibc shared
+ objects
+
+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 <carlos@redhat.com>
+---
+ Makeconfig | 9 +++++++++
+ Makerules | 7 +++++++
+ config.make.in | 1 +
+ configure | 28 ++++++++++++++++++++++++++++
+ configure.ac | 16 ++++++++++++++++
+ 5 files changed, 61 insertions(+)
+
+diff --git b/Makeconfig a/Makeconfig
+index 760f14e92f..0aa5fb0099 100644
+--- b/Makeconfig
++++ a/Makeconfig
+@@ -362,6 +362,15 @@ 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 <<EOF
++int _start (void) { return 42; }
++EOF
++if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
++ -fPIC -shared -o conftest.so conftest.c
++ -Wl,--hash-style=both -nostdlib 1>&5'
++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&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 <<EOF
++int _start (void) { return 42; }
++EOF
++if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp
++ -fPIC -shared -o conftest.so conftest.c
++ -Wl,--hash-style=both -nostdlib 1>&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 <<EOF
+--
+2.37.1
+