summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeptazhou2022-02-24 22:50:59 +0000
committerHeptazhou2022-02-24 22:50:59 +0000
commitf891c834a3f45b2ebd8496039d38e629fba72ef1 (patch)
tree1b45a202b1f6762c221338ab22b57c058b2d3a03
parent5fd83607c9d6316161927b6cafb248bc2b9cea04 (diff)
downloadaur-f891c834a3f45b2ebd8496039d38e629fba72ef1.tar.gz
glibc-linux4 v2.35
-rw-r--r--.SRCINFO38
-rw-r--r--PKGBUILD440
-rw-r--r--bz27343.patch48
-rw-r--r--glibc-linux4-syscalls.patch358
-rw-r--r--glibc-linux4.patch317
-rw-r--r--locale.gen.txt5
6 files changed, 563 insertions, 643 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 273791c86bcc..5cd16d61bde5 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = glibc-linux4
- pkgver = 2.33
- pkgrel = 3
- url = https://www.gnu.org/software/libc
+ pkgver = 2.35
+ pkgrel = 2
+ url = https://www.gnu.org/software/libc/
arch = x86_64
license = GPL
license = LGPL
@@ -12,26 +12,25 @@ pkgbase = glibc-linux4
optdepends = perl: for mtrace
options = !strip
options = staticlibs
- source = https://ftp.gnu.org/gnu/glibc/glibc-2.33.tar.xz
- source = https://ftp.gnu.org/gnu/glibc/glibc-2.33.tar.xz.sig
- source = glibc-linux4-syscalls.patch
+ options = !lto
+ source = https://ftp.gnu.org/gnu/glibc/glibc-2.35.tar.xz
+ source = https://ftp.gnu.org/gnu/glibc/glibc-2.35.tar.xz.sig
+ source = glibc-linux4.patch
source = locale.gen.txt
source = locale-gen
source = lib32-glibc.conf
source = sdt.h
source = sdt-config.h
- source = bz27343.patch
validpgpkeys = 7273542B39962DF7B299931416792B4EA25340F8
validpgpkeys = BC7C7372637EC10C57D7AA6579C43DFBF1CF2187
- md5sums = 390bbd889c7e8e8a7041564cb6b27cca
- md5sums = SKIP
- md5sums = SKIP
- md5sums = 07ac979b6ab5eeb778d55f041529d623
- md5sums = 476e9113489f93b348b21e144b6a8fcf
- md5sums = 6e052f1cb693d5d3203f50f9d4e8c33b
- md5sums = 91fec3b7e75510ae2ac42533aa2e695e
- md5sums = 680df504c683640b02ed4a805797c0b2
- md5sums = cfe57018d06bf748b8ca1779980fef33
+ sha256sums = 5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e
+ sha256sums = SKIP
+ sha256sums = 640450afbcb4a0951e56e89d1d8d384e09589032ef32605c08d9894311dda852
+ sha256sums = fbd57987ca24d71305eda9e0dd76143b422118e12f76b2b0d555f86763e14cd2
+ sha256sums = 83f108f915863c7ed0338e2d3e8f2e071a531a090ef8f8b2eb3a956a3c4f04d7
+ sha256sums = c27424154a6096ae32c0824b785e05de6acef33d9224fd6147d1936be9b4962b
+ sha256sums = 774061aff612a377714a509918a9e0e0aafce708b87d2d7e06b1bd1f6542fe70
+ sha256sums = cdc234959c6fdb43f000d3bb7d1080b0103f4080f5e67bcfe8ae1aaf477812f0
pkgname = glibc-linux4
pkgdesc = GNU C Library (linux 4.x compat)
@@ -40,7 +39,7 @@ pkgname = glibc-linux4
depends = tzdata
depends = filesystem
optdepends = gd: for memusagestat
- provides = glibc=2.33
+ provides = glibc=2.35
conflicts = glibc
backup = etc/gai.conf
backup = etc/locale.gen
@@ -48,9 +47,10 @@ pkgname = glibc-linux4
pkgname = lib32-glibc-linux4
pkgdesc = GNU C Library (32-bit, linux 4.x compat)
- depends = glibc=2.33
- provides = lib32-glibc=2.33
+ depends = glibc=2.35
+ provides = lib32-glibc=2.35
conflicts = lib32-glibc
options = !strip
options = staticlibs
+ options = !lto
options = !emptydirs
diff --git a/PKGBUILD b/PKGBUILD
index 59781a5d0ad0..85da645740dd 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,243 +1,253 @@
-# Maintainer: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Maintainer: Heptazhou <zhou at 0h7z dot com>
# Contributor: Allan McRae <allan@archlinux.org>
+# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
+# Contributor: Giancarlo Razzolini <grazzolini@archlinux.org>
+# Contributor: Frederik Schwan <freswa at archlinux dot org>
-# toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
+# toolchain build order: linux-api-headers->glibc->binutils->gcc->glibc->binutils->gcc
# NOTE: valgrind requires rebuilt with each major glibc version
pkgbase=glibc-linux4
pkgname=(glibc-linux4 lib32-glibc-linux4)
-pkgver=2.33
-pkgrel=3
+pkgver=2.35
+pkgrel=2
arch=(x86_64)
-url='https://www.gnu.org/software/libc'
+url="https://www.gnu.org/software/libc/"
license=(GPL LGPL)
makedepends=(git gd lib32-gcc-libs python)
-optdepends=('perl: for mtrace')
-options=(!strip staticlibs)
-#_commit=3de512be7ea6053255afed6154db9ee31d4e557a
-#source=(git+https://sourceware.org/git/glibc.git#commit=$_commit
-source=(https://ftp.gnu.org/gnu/glibc/glibc-$pkgver.tar.xz{,.sig}
- glibc-linux4-syscalls.patch
- locale.gen.txt
- locale-gen
- lib32-glibc.conf
- sdt.h sdt-config.h
- bz27343.patch)
-validpgpkeys=(7273542B39962DF7B299931416792B4EA25340F8 # Carlos O'Donell
- BC7C7372637EC10C57D7AA6579C43DFBF1CF2187) # Siddhesh Poyarekar
-md5sums=('390bbd889c7e8e8a7041564cb6b27cca'
- 'SKIP'
- 'SKIP'
- '07ac979b6ab5eeb778d55f041529d623'
- '476e9113489f93b348b21e144b6a8fcf'
- '6e052f1cb693d5d3203f50f9d4e8c33b'
- '91fec3b7e75510ae2ac42533aa2e695e'
- '680df504c683640b02ed4a805797c0b2'
- 'cfe57018d06bf748b8ca1779980fef33')
+optdepends=("perl: for mtrace")
+options=(!strip staticlibs !lto)
+# _commit=3de512be7ea6053255afed6154db9ee31d4e557a
+source=(
+ # git+https://sourceware.org/git/glibc.git#commit=$_commit
+ https://ftp.gnu.org/gnu/glibc/glibc-$pkgver.tar.xz{,.sig}
+ glibc-linux4.patch
+ locale.gen.txt
+ locale-gen
+ lib32-glibc.conf
+ sdt.h
+ sdt-config.h
+)
+validpgpkeys=(
+ 7273542B39962DF7B299931416792B4EA25340F8 # Carlos O'Donell
+ BC7C7372637EC10C57D7AA6579C43DFBF1CF2187 # Siddhesh Poyarekar
+)
+sha256sums=(
+ #
+ "5123732f6b67ccd319305efd399971d58592122bcc2a6518a1bd2510dd0cf52e" "SKIP"
+ "640450afbcb4a0951e56e89d1d8d384e09589032ef32605c08d9894311dda852"
+ "fbd57987ca24d71305eda9e0dd76143b422118e12f76b2b0d555f86763e14cd2"
+ "83f108f915863c7ed0338e2d3e8f2e071a531a090ef8f8b2eb3a956a3c4f04d7"
+ "c27424154a6096ae32c0824b785e05de6acef33d9224fd6147d1936be9b4962b"
+ "774061aff612a377714a509918a9e0e0aafce708b87d2d7e06b1bd1f6542fe70"
+ "cdc234959c6fdb43f000d3bb7d1080b0103f4080f5e67bcfe8ae1aaf477812f0"
+)
prepare() {
- mkdir -p glibc-build lib32-glibc-build
+ mkdir -p glibc-build lib32-glibc-build
- [[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc
- cd glibc
+ [[ -d glibc-$pkgver ]] && ln -s glibc-$pkgver glibc
+ cd glibc
- # commit c3479fb7939898ec22c655c383454d6e8b982a67
- patch -p1 -i "$srcdir"/bz27343.patch
-
- # compatibility with linux 4.x hosts
- patch -p1 -i "$srcdir"/glibc-linux4-syscalls.patch
+ # compatibility with linux 4.x hosts
+ patch -Np1 < "$srcdir"/glibc-linux4.patch
}
build() {
- local _configure_flags=(
- --prefix=/usr
- --with-headers=/usr/include
- --with-bugurl=https://bugs.archlinux.org/
- --enable-add-ons
- --enable-bind-now
- --enable-cet
- --enable-lock-elision
- --enable-multi-arch
- --enable-stack-protector=strong
- --enable-stackguard-randomization
- --enable-static-pie
- --enable-systemtap
- --disable-profile
- --disable-werror
- )
-
- cd "$srcdir/glibc-build"
-
- echo "slibdir=/usr/lib" >> configparms
- echo "rtlddir=/usr/lib" >> configparms
- echo "sbindir=/usr/bin" >> configparms
- echo "rootsbindir=/usr/bin" >> configparms
-
- # remove fortify for building libraries
- CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} # Before and
- CFLAGS=${CFLAGS/-D_FORTIFY_SOURCE=2,/} # after https://github.com/archlinux/svntogit-packages/commit/a790c38
-
- #
- CFLAGS=${CFLAGS/-fno-plt/}
- CXXFLAGS=${CXXFLAGS/-fno-plt/}
- LDFLAGS=${LDFLAGS/,-z,now/}
-
- "$srcdir/glibc/configure" \
- --libdir=/usr/lib \
- --libexecdir=/usr/lib \
- ${_configure_flags[@]}
-
- # build libraries with fortify disabled
- echo "build-programs=no" >> configparms
- make
-
- # re-enable fortify for programs
- sed -i "/build-programs=/s#no#yes#" configparms
-
- echo "CC += -D_FORTIFY_SOURCE=2" >> configparms
- echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms
- make
-
- # build info pages manually for reprducibility
- make info
-
- cd "$srcdir/lib32-glibc-build"
- export CC="gcc -m32 -mstackrealign"
- export CXX="g++ -m32 -mstackrealign"
-
- echo "slibdir=/usr/lib32" >> configparms
- echo "rtlddir=/usr/lib32" >> configparms
- echo "sbindir=/usr/bin" >> configparms
- echo "rootsbindir=/usr/bin" >> configparms
-
- # remove fortify for building libraries
- CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
- CFLAGS=${CFLAGS/-fno-plt/}
- CXXFLAGS=${CXXFLAGS/-fno-plt/}
-
- "$srcdir/glibc/configure" \
- --host=i686-pc-linux-gnu \
- --libdir=/usr/lib32 \
- --libexecdir=/usr/lib32 \
- ${_configure_flags[@]}
-
- # build libraries with fortify disabled
- echo "build-programs=no" >> configparms
- make
-
- # re-enable fortify for programs
- sed -i "/build-programs=/s#no#yes#" configparms
-
- echo "CC += -D_FORTIFY_SOURCE=2" >> configparms
- echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms
- make
-
+ local _configure_flags=(
+ --prefix=/usr
+ --with-headers=/usr/include
+ --with-bugurl=https://bugs.archlinux.org/
+ --enable-bind-now
+ --enable-cet
+ --enable-multi-arch
+ --enable-stack-protector=strong
+ --enable-systemtap
+ --disable-profile
+ --disable-crypt
+ --disable-werror
+ )
+
+ cd -- "$srcdir/glibc-build"
+
+ echo "slibdir=/usr/lib" >> configparms
+ echo "rtlddir=/usr/lib" >> configparms
+ echo "sbindir=/usr/bin" >> configparms
+ echo "rootsbindir=/usr/bin" >> configparms
+
+ # remove fortify for building libraries
+ CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/} # Before and
+ CFLAGS=${CFLAGS/,-D_FORTIFY_SOURCE=2/} # after https://github.com/archlinux/svntogit-packages/commit/a790c38
+ CFLAGS=${CFLAGS/-Wp /}
+
+ #
+ CFLAGS=${CFLAGS/-fno-plt/}
+ CXXFLAGS=${CXXFLAGS/-fno-plt/}
+ LDFLAGS=${LDFLAGS/,-z,now/}
+
+ "$srcdir/glibc/configure" \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib \
+ "${_configure_flags[@]}"
+
+ # build libraries with fortify disabled
+ echo "build-programs=no" >> configparms
+ make -O
+
+ # re-enable fortify for programs
+ sed -i "/build-programs=/s#no#yes#" configparms
+
+ echo "CC += -D_FORTIFY_SOURCE=2" >> configparms
+ echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms
+ make -O
+
+ # build info pages manually for reprducibility
+ make info
+
+ cd -- "$srcdir/lib32-glibc-build"
+ export CC="gcc -m32 -mstackrealign"
+ export CXX="g++ -m32 -mstackrealign"
+
+ echo "slibdir=/usr/lib32" >> configparms
+ echo "rtlddir=/usr/lib32" >> configparms
+ echo "sbindir=/usr/bin" >> configparms
+ echo "rootsbindir=/usr/bin" >> configparms
+
+ # remove fortify for building libraries
+ CPPFLAGS=${CPPFLAGS/-D_FORTIFY_SOURCE=2/}
+ CFLAGS=${CFLAGS/-fno-plt/}
+ CXXFLAGS=${CXXFLAGS/-fno-plt/}
+
+ "$srcdir/glibc/configure" \
+ --host=i686-pc-linux-gnu \
+ --libdir=/usr/lib32 \
+ --libexecdir=/usr/lib32 \
+ "${_configure_flags[@]}"
+
+ # build libraries with fortify disabled
+ echo "build-programs=no" >> configparms
+ make -O
+
+ # re-enable fortify for programs
+ sed -i "/build-programs=/s#no#yes#" configparms
+
+ echo "CC += -D_FORTIFY_SOURCE=2" >> configparms
+ echo "CXX += -D_FORTIFY_SOURCE=2" >> configparms
+ make -O
}
check() {
- cd glibc-build
+ cd glibc-build
- # remove fortify in preparation to run test-suite
- sed -i '/FORTIFY/d' configparms
+ # remove fortify in preparation to run test-suite
+ sed -i '/FORTIFY/d' configparms
- # some failures are "expected"
- make check || true
+ # some failures are "expected"
+ make check || true
}
package_glibc-linux4() {
- pkgdesc='GNU C Library (linux 4.x compat)'
- depends=('linux-api-headers>=4.10' tzdata filesystem)
- provides=("glibc=${pkgver}")
- conflicts=('glibc')
- optdepends=('gd: for memusagestat')
- install=glibc.install
- backup=(etc/gai.conf
- etc/locale.gen
- etc/nscd.conf)
-
- install -dm755 "$pkgdir/etc"
- touch "$pkgdir/etc/ld.so.conf"
-
- make -C glibc-build install_root="$pkgdir" install
- rm -f "$pkgdir"/etc/ld.so.{cache,conf}
-
- # Shipped in tzdata
- rm -f "$pkgdir"/usr/bin/{tzselect,zdump,zic}
-
- cd glibc
-
- install -dm755 "$pkgdir"/usr/lib/{locale,systemd/system,tmpfiles.d}
- install -m644 nscd/nscd.conf "$pkgdir/etc/nscd.conf"
- 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"
-
- # 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"
-
- if check_option 'debug' n; then
- 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, but strip the rest
- 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"
- install -Dm644 "$srcdir/sdt-config.h" "$pkgdir/usr/include/sys/sdt-config.h"
-
- # Provided by libxcrypt; keep the old shared library for backwards compatibility
- rm -f "$pkgdir"/usr/include/crypt.h "$pkgdir"/usr/lib/libcrypt.{a,so}
+ pkgdesc="GNU C Library (linux 4.x compat)"
+ depends=("linux-api-headers>=4.10" tzdata filesystem)
+ provides=("glibc=$pkgver")
+ conflicts=("glibc")
+ optdepends=("gd: for memusagestat")
+ install=glibc.install
+ backup=(
+ etc/gai.conf
+ etc/locale.gen
+ etc/nscd.conf
+ )
+
+ install -dm755 "$pkgdir/etc"
+ touch "$pkgdir/etc/ld.so.conf"
+
+ make -C glibc-build install_root="$pkgdir" install
+ rm -f "$pkgdir"/etc/ld.so.{cache,conf}
+
+ # Shipped in tzdata
+ rm -f "$pkgdir"/usr/bin/{tzselect,zdump,zic}
+
+ cd glibc
+
+ install -dm755 "$pkgdir"/usr/lib/{locale,systemd/system,tmpfiles.d}
+ install -m644 nscd/nscd.conf "$pkgdir/etc/nscd.conf"
+ 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"
+
+ # 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"
+
+ if check_option "debug" n; then
+ 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, but strip the rest
+ find "$pkgdir"/usr/lib \
+ -not -name 'ld-*.so*' \
+ -not -name 'libc.so*' \
+ -not -name 'libc-*.so' \
+ -not -name 'libpthread.so*' \
+ -not -name 'libpthread-*.so' \
+ -not -name 'libthread_db.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"
+ install -Dm644 "$srcdir/sdt-config.h" "$pkgdir/usr/include/sys/sdt-config.h"
+
+ # Provided by libxcrypt; keep the old shared library for backwards compatibility
+ rm -f "$pkgdir"/usr/include/crypt.h "$pkgdir"/usr/lib/libcrypt.{a,so}
}
package_lib32-glibc-linux4() {
- pkgdesc='GNU C Library (32-bit, linux 4.x compat)'
- depends=("glibc=$pkgver")
- provides=("lib32-glibc=${pkgver}")
- conflicts=('lib32-glibc')
- options+=('!emptydirs')
-
- cd lib32-glibc-build
-
- make install_root="$pkgdir" install
- rm -rf "$pkgdir"/{etc,sbin,usr/{bin,sbin,share},var}
-
- # We need to keep 32 bit specific header files
- find "$pkgdir/usr/include" -type f -not -name '*-32.h' -delete
-
- # Dynamic linker
- install -d "$pkgdir/usr/lib"
- ln -s ../lib32/ld-linux.so.2 "$pkgdir/usr/lib/"
-
- # Add lib32 paths to the default library search path
- install -Dm644 "$srcdir/lib32-glibc.conf" "$pkgdir/etc/ld.so.conf.d/lib32-glibc.conf"
-
- # Symlink /usr/lib32/locale to /usr/lib/locale
- ln -s ../lib/locale "$pkgdir/usr/lib32/locale"
-
- if check_option 'debug' n; then
- find "$pkgdir"/usr/lib32 -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true
- 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
-
- # Provided by lib32-libxcrypt; keep the old shared library for backwards compatibility
- rm -f "$pkgdir"/usr/lib32/libcrypt.{a,so}
+ pkgdesc="GNU C Library (32-bit, linux 4.x compat)"
+ depends=("glibc=$pkgver")
+ provides=("lib32-glibc=$pkgver")
+ conflicts=("lib32-glibc")
+ options+=("!emptydirs")
+
+ cd lib32-glibc-build
+
+ make install_root="$pkgdir" install
+ rm -rf "$pkgdir"/{etc,sbin,usr/{bin,sbin,share},var}
+
+ # We need to keep 32 bit specific header files
+ find "$pkgdir/usr/include" -type f -not -name '*-32.h' -delete
+
+ # Dynamic linker
+ install -d "$pkgdir/usr/lib"
+ ln -s ../lib32/ld-linux.so.2 "$pkgdir/usr/lib/"
+
+ # Add lib32 paths to the default library search path
+ install -Dm644 "$srcdir/lib32-glibc.conf" "$pkgdir/etc/ld.so.conf.d/lib32-glibc.conf"
+
+ # Symlink /usr/lib32/locale to /usr/lib/locale
+ ln -s ../lib/locale "$pkgdir/usr/lib32/locale"
+
+ if check_option "debug" n; then
+ find "$pkgdir"/usr/lib32 -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2> /dev/null || true
+ find "$pkgdir"/usr/lib32 \
+ -not -name 'ld-*.so*' \
+ -not -name 'libc.so*' \
+ -not -name 'libc-*.so' \
+ -not -name 'libpthread.so*' \
+ -not -name 'libpthread-*.so' \
+ -not -name 'libthread_db.so*' \
+ -not -name 'libthread_db-*.so' \
+ -name '*.so*' -type f -exec strip $STRIP_SHARED {} + 2> /dev/null || true
+ fi
+
+ # Provided by lib32-libxcrypt; keep the old shared library for backwards compatibility
+ rm -f "$pkgdir"/usr/lib32/libcrypt.{a,so}
}
diff --git a/bz27343.patch b/bz27343.patch
deleted file mode 100644
index 3db6a9440eb2..000000000000
--- a/bz27343.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From c3479fb7939898ec22c655c383454d6e8b982a67 Mon Sep 17 00:00:00 2001
-From: Sergei Trofimovich <slyfox@gentoo.org>
-Date: Fri, 5 Feb 2021 07:32:18 +0000
-Subject: [PATCH] nsswitch: return result when nss database is locked [BZ
- #27343]
-
-Before the change nss_database_check_reload_and_get() did not populate
-the '*result' value when it returned success in a case of chroot
-detection. This caused initgroups() to use garage pointer in the
-following test (extracted from unbound):
-
-```
-
-int main() {
- // load some NSS modules
- struct passwd * pw = getpwnam("root");
-
- chdir("/tmp");
- chroot("/tmp");
- chdir("/");
- // access nsswitch.conf in a chroot
- initgroups("root", 0);
-}
-```
-
-Reviewed-by: DJ Delorie <dj@redhat.com>
----
- nss/nss_database.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/nss/nss_database.c b/nss/nss_database.c
-index cf0306adc4..e1bef6bd75 100644
---- a/nss/nss_database.c
-+++ b/nss/nss_database.c
-@@ -398,8 +398,9 @@ nss_database_check_reload_and_get (struct nss_database_state *local,
- && (str.st_ino != local->root_ino
- || str.st_dev != local->root_dev)))
- {
-- /* Change detected; disable reloading. */
-+ /* Change detected; disable reloading and return current state. */
- atomic_store_release (&local->data.reload_disabled, 1);
-+ *result = local->data.services[database_index];
- __libc_lock_unlock (local->lock);
- __nss_module_disable_loading ();
- return true;
---
-2.27.0
-
diff --git a/glibc-linux4-syscalls.patch b/glibc-linux4-syscalls.patch
deleted file mode 100644
index c2d5e44ec934..000000000000
--- a/glibc-linux4-syscalls.patch
+++ /dev/null
@@ -1,358 +0,0 @@
-diff --git a/sysdeps/nptl/futex-internal.c b/sysdeps/nptl/futex-internal.c
-index 89b4ba76e9..5033193472 100644
---- a/sysdeps/nptl/futex-internal.c
-+++ b/sysdeps/nptl/futex-internal.c
-@@ -71,13 +71,9 @@ __futex_abstimed_wait_common64 (unsigned int* futex_word,
- int op = __lll_private_flag (FUTEX_WAIT_BITSET | clockbit, private);
-
- if (cancel)
-- err = INTERNAL_SYSCALL_CANCEL (futex_time64, futex_word, op, expected,
-- abstime, NULL /* Unused. */,
-- FUTEX_BITSET_MATCH_ANY);
-+ err = -ENOSYS; //INTERNAL_SYSCALL_CANCEL (futex_time64, futex_word, op, expected, abstime, NULL /* Unused. */, FUTEX_BITSET_MATCH_ANY);
- else
-- err = INTERNAL_SYSCALL_CALL (futex_time64, futex_word, op, expected,
-- abstime, NULL /* Ununsed. */,
-- FUTEX_BITSET_MATCH_ANY);
-+ err = -ENOSYS; //INTERNAL_SYSCALL_CALL (futex_time64, futex_word, op, expected, abstime, NULL /* Ununsed. */, FUTEX_BITSET_MATCH_ANY);
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (err == -ENOSYS)
- err = __futex_abstimed_wait_common32 (futex_word, expected, op, abstime,
-diff --git a/sysdeps/nptl/futex-internal.h b/sysdeps/nptl/futex-internal.h
-index 4c192c99e3..4e977b4598 100644
---- a/sysdeps/nptl/futex-internal.h
-+++ b/sysdeps/nptl/futex-internal.h
-@@ -254,9 +254,7 @@ static __always_inline int
- futex_lock_pi64 (int *futex_word, const struct __timespec64 *abstime,
- int private)
- {
-- int err = INTERNAL_SYSCALL_CALL (futex_time64, futex_word,
-- __lll_private_flag
-- (FUTEX_LOCK_PI, private), 0, abstime);
-+ int err = -ENOSYS; //INTERNAL_SYSCALL_CALL (futex_time64, futex_word, __lll_private_flag (FUTEX_LOCK_PI, private), 0, abstime);
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (err == -ENOSYS)
- {
-diff --git a/sysdeps/unix/sysv/linux/clock_adjtime.c b/sysdeps/unix/sysv/linux/clock_adjtime.c
-index 7850eb2ec4..606cb46f1b 100644
---- a/sysdeps/unix/sysv/linux/clock_adjtime.c
-+++ b/sysdeps/unix/sysv/linux/clock_adjtime.c
-@@ -29,7 +29,8 @@ __clock_adjtime64 (const clockid_t clock_id, struct __timex64 *tx64)
- #ifndef __NR_clock_adjtime64
- # define __NR_clock_adjtime64 __NR_clock_adjtime
- #endif
-- int r = INLINE_SYSCALL_CALL (clock_adjtime64, clock_id, tx64);
-+ int r = -1; // INLINE_SYSCALL_CALL (clock_adjtime64, clock_id, tx64);
-+ errno = ENOSYS;
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (r >= 0 || errno != ENOSYS)
- return r;
-diff --git a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
-index 15215d6855..ba1de750df 100644
---- a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
-+++ b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
-@@ -34,7 +34,7 @@ __clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
- #ifndef __NR_clock_getres_time64
- # define __NR_clock_getres_time64 __NR_clock_getres
- #endif
-- int r = INTERNAL_SYSCALL_CALL (clock_getres_time64, pidclock, NULL);
-+ int r = -ENOSYS; //INTERNAL_SYSCALL_CALL (clock_getres_time64, pidclock, NULL);
-
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (r != 0 && r == -ENOSYS)
-diff --git a/sysdeps/unix/sysv/linux/clock_getres.c b/sysdeps/unix/sysv/linux/clock_getres.c
-index 14e50fbdf2..f2d21bcf52 100644
---- a/sysdeps/unix/sysv/linux/clock_getres.c
-+++ b/sysdeps/unix/sysv/linux/clock_getres.c
-@@ -37,9 +37,9 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res)
- if (supports_time64 ())
- {
- #ifdef HAVE_CLOCK_GETRES64_VSYSCALL
-- r = INLINE_VSYSCALL (clock_getres_time64, 2, clock_id, res);
-+ r = ENOSYS; //INLINE_VSYSCALL (clock_getres_time64, 2, clock_id, res);
- #else
-- r = INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res);
-+ r = ENOSYS; //INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res);
- #endif
-
- if (r == 0 || errno != ENOSYS)
-diff --git a/sysdeps/unix/sysv/linux/clock_gettime.c b/sysdeps/unix/sysv/linux/clock_gettime.c
-index 781d05c2fd..f4d8d07e0e 100644
---- a/sysdeps/unix/sysv/linux/clock_gettime.c
-+++ b/sysdeps/unix/sysv/linux/clock_gettime.c
-@@ -38,9 +38,9 @@ __clock_gettime64 (clockid_t clock_id, struct __timespec64 *tp)
- if (supports_time64 ())
- {
- #ifdef HAVE_CLOCK_GETTIME64_VSYSCALL
-- r = INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
-+ r = ENOSYS; //INLINE_VSYSCALL (clock_gettime64, 2, clock_id, tp);
- #else
-- r = INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp);
-+ r = ENOSYS; //INLINE_SYSCALL_CALL (clock_gettime64, clock_id, tp);
- #endif
-
- if (r == 0 || errno != ENOSYS)
-diff --git a/sysdeps/unix/sysv/linux/clock_nanosleep.c b/sysdeps/unix/sysv/linux/clock_nanosleep.c
-index 007f1736cb..a8e7bf94c8 100644
---- a/sysdeps/unix/sysv/linux/clock_nanosleep.c
-+++ b/sysdeps/unix/sysv/linux/clock_nanosleep.c
-@@ -40,8 +40,7 @@ __clock_nanosleep_time64 (clockid_t clock_id, int flags, const struct __timespec
- #ifndef __NR_clock_nanosleep_time64
- # define __NR_clock_nanosleep_time64 __NR_clock_nanosleep
- #endif
-- int r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id,
-- flags, req, rem);
-+ int r = -ENOSYS; //INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id, flags, req, rem);
-
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (r == 0 || r != -ENOSYS)
-diff --git a/sysdeps/unix/sysv/linux/clock_settime.c b/sysdeps/unix/sysv/linux/clock_settime.c
-index 598d72b8b1..54a1d3c208 100644
---- a/sysdeps/unix/sysv/linux/clock_settime.c
-+++ b/sysdeps/unix/sysv/linux/clock_settime.c
-@@ -35,7 +35,8 @@ __clock_settime64 (clockid_t clock_id, const struct __timespec64 *tp)
- #ifndef __NR_clock_settime64
- # define __NR_clock_settime64 __NR_clock_settime
- #endif
-- int ret = INLINE_SYSCALL_CALL (clock_settime64, clock_id, tp);
-+ int ret = -1; //INLINE_SYSCALL_CALL (clock_settime64, clock_id, tp);
-+ errno = ENOSYS;
-
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (ret == 0 || errno != ENOSYS)
-diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c
-index 13160d3249..9f35998f9e 100644
---- a/sysdeps/unix/sysv/linux/faccessat.c
-+++ b/sysdeps/unix/sysv/linux/faccessat.c
-@@ -26,7 +26,8 @@
- int
- __faccessat (int fd, const char *file, int mode, int flag)
- {
-- int ret = INLINE_SYSCALL_CALL (faccessat2, fd, file, mode, flag);
-+ int ret = -1; //INLINE_SYSCALL_CALL (faccessat2, fd, file, mode, flag);
-+ errno = ENOSYS;
- #if __ASSUME_FACCESSAT2
- return ret;
- #else
-diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
-index 1680b10ca1..bb903c44cc 100644
---- a/sysdeps/unix/sysv/linux/kernel-features.h
-+++ b/sysdeps/unix/sysv/linux/kernel-features.h
-@@ -201,7 +201,7 @@
- #if __LINUX_KERNEL_VERSION >= 0x050100 \
- || __WORDSIZE == 64 \
- || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64)
--# define __ASSUME_TIME64_SYSCALLS 1
-+# define NO_ASSUME_TIME64_SYSCALLS 1
- #endif
-
- /* Linux waitid prior kernel 5.4 does not support waiting for the current
-@@ -213,7 +213,7 @@
- /* The faccessat2 system call was introduced across all architectures
- in Linux 5.8. */
- #if __LINUX_KERNEL_VERSION >= 0x050800
--# define __ASSUME_FACCESSAT2 1
-+# define __ASSUME_FACCESSAT2 0
- #else
- # define __ASSUME_FACCESSAT2 0
- #endif
-diff --git a/sysdeps/unix/sysv/linux/mq_timedreceive.c b/sysdeps/unix/sysv/linux/mq_timedreceive.c
-index eb948ccc18..d63d314592 100644
---- a/sysdeps/unix/sysv/linux/mq_timedreceive.c
-+++ b/sysdeps/unix/sysv/linux/mq_timedreceive.c
-@@ -29,8 +29,8 @@ __mq_timedreceive_time64 (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len,
- #ifndef __NR_mq_timedreceive_time64
- # define __NR_mq_timedreceive_time64 __NR_mq_timedreceive
- #endif
-- int ret = SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len,
-- msg_prio, abs_timeout);
-+ int ret = -1; //SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout);
-+ errno = ENOSYS;
-
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (ret == 0 || errno != ENOSYS)
-diff --git a/sysdeps/unix/sysv/linux/mq_timedsend.c b/sysdeps/unix/sysv/linux/mq_timedsend.c
-index 5f14ecb0bf..e77979d248 100644
---- a/sysdeps/unix/sysv/linux/mq_timedsend.c
-+++ b/sysdeps/unix/sysv/linux/mq_timedsend.c
-@@ -29,8 +29,8 @@ __mq_timedsend_time64 (mqd_t mqdes, const char *msg_ptr, size_t msg_len,
- # ifndef __NR_mq_timedsend_time64
- # define __NR_mq_timedsend_time64 __NR_mq_timedsend
- # endif
-- int ret = SYSCALL_CANCEL (mq_timedsend_time64, mqdes, msg_ptr, msg_len,
-- msg_prio, abs_timeout);
-+ int ret = -1; //SYSCALL_CANCEL (mq_timedsend_time64, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout);
-+ errno = ENOSYS;
-
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (ret == 0 || errno != ENOSYS)
-diff --git a/sysdeps/unix/sysv/linux/ppoll.c b/sysdeps/unix/sysv/linux/ppoll.c
-index 624f14f517..1c042f8238 100644
---- a/sysdeps/unix/sysv/linux/ppoll.c
-+++ b/sysdeps/unix/sysv/linux/ppoll.c
-@@ -45,8 +45,8 @@ __ppoll64 (struct pollfd *fds, nfds_t nfds, const struct __timespec64 *timeout,
- #ifndef __NR_ppoll_time64
- # define __NR_ppoll_time64 __NR_ppoll
- #endif
-- ret = SYSCALL_CANCEL (ppoll_time64, fds, nfds, timeout, sigmask,
-- __NSIG_BYTES);
-+ ret = -1; //SYSCALL_CANCEL (ppoll_time64, fds, nfds, timeout, sigmask, __NSIG_BYTES);
-+ errno = ENOSYS;
-
- if (ret == 0 || errno != ENOSYS)
- return ret;
-diff --git a/sysdeps/unix/sysv/linux/pselect.c b/sysdeps/unix/sysv/linux/pselect.c
-index 5e8a0cc2dc..053785a5ad 100644
---- a/sysdeps/unix/sysv/linux/pselect.c
-+++ b/sysdeps/unix/sysv/linux/pselect.c
-@@ -49,8 +49,8 @@ __pselect64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- {
- (uintptr_t) sigmask, __NSIG_BYTES
- };
-- r = SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds, exceptfds,
-- timeout, data);
-+ r = -1; //SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds, exceptfds, timeout, data);
-+ errno = ENOSYS;
- if (r == 0 || errno != ENOSYS)
- return r;
-
-diff --git a/sysdeps/unix/sysv/linux/recvmmsg.c b/sysdeps/unix/sysv/linux/recvmmsg.c
-index 672ba20332..d99dafcfc5 100644
---- a/sysdeps/unix/sysv/linux/recvmmsg.c
-+++ b/sysdeps/unix/sysv/linux/recvmmsg.c
-@@ -27,8 +27,8 @@ __recvmmsg64 (int fd, struct mmsghdr *vmessages, unsigned int vlen, int flags,
- #ifndef __NR_recvmmsg_time64
- # define __NR_recvmmsg_time64 __NR_recvmmsg
- #endif
-- int r = SYSCALL_CANCEL (recvmmsg_time64, fd, vmessages, vlen, flags,
-- timeout);
-+ int r = -1; //SYSCALL_CANCEL (recvmmsg_time64, fd, vmessages, vlen, flags, timeout);
-+ errno = ENOSYS;
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (r >= 0 || errno != ENOSYS)
- return r;
-diff --git a/sysdeps/unix/sysv/linux/sched_rr_gi.c b/sysdeps/unix/sysv/linux/sched_rr_gi.c
-index 5e55cf4977..fa172ee8bc 100644
---- a/sysdeps/unix/sysv/linux/sched_rr_gi.c
-+++ b/sysdeps/unix/sysv/linux/sched_rr_gi.c
-@@ -28,7 +28,8 @@ __sched_rr_get_interval64 (pid_t pid, struct __timespec64 *tp)
- #ifndef __NR_sched_rr_get_interval_time64
- # define __NR_sched_rr_get_interval_time64 __NR_sched_rr_get_interval
- #endif
-- int ret = INLINE_SYSCALL_CALL (sched_rr_get_interval_time64, pid, tp);
-+ int ret = -1; //INLINE_SYSCALL_CALL (sched_rr_get_interval_time64, pid, tp);
-+ errno = ENOSYS;
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (ret == 0 || errno != ENOSYS)
- return ret;
-diff --git a/sysdeps/unix/sysv/linux/select.c b/sysdeps/unix/sysv/linux/select.c
-index 415aa87d3c..ecbe0456ac 100644
---- a/sysdeps/unix/sysv/linux/select.c
-+++ b/sysdeps/unix/sysv/linux/select.c
-@@ -46,8 +46,8 @@ __select64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
- int r;
- if (supports_time64 ())
- {
-- r = SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds, exceptfds,
-- pts64, NULL);
-+ r = -1; //SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds, exceptfds, pts64, NULL);
-+ errno = ENOSYS;
- /* Linux by default will update the timeout after a pselect6 syscall
- (though the pselect() glibc call suppresses this behavior).
- Since select() on Linux has the same behavior as the pselect6
-diff --git a/sysdeps/unix/sysv/linux/semtimedop.c b/sysdeps/unix/sysv/linux/semtimedop.c
-index b732b6db48..a7050420ab 100644
---- a/sysdeps/unix/sysv/linux/semtimedop.c
-+++ b/sysdeps/unix/sysv/linux/semtimedop.c
-@@ -28,7 +28,8 @@ __semtimedop64 (int semid, struct sembuf *sops, size_t nsops,
- {
- int r;
- #if defined __NR_semtimedop_time64
-- r = INLINE_SYSCALL_CALL (semtimedop_time64, semid, sops, nsops, timeout);
-+ r = -1; //INLINE_SYSCALL_CALL (semtimedop_time64, semid, sops, nsops, timeout);
-+ errno = ENOSYS;
- #elif defined __ASSUME_DIRECT_SYSVIPC_SYSCALLS && defined __NR_semtimedop
- r = INLINE_SYSCALL_CALL (semtimedop, semid, sops, nsops, timeout);
- #else
-diff --git a/sysdeps/unix/sysv/linux/time64-support.h b/sysdeps/unix/sysv/linux/time64-support.h
-index 8466d37f8f..35bf73f5ee 100644
---- a/sysdeps/unix/sysv/linux/time64-support.h
-+++ b/sysdeps/unix/sysv/linux/time64-support.h
-@@ -54,6 +54,7 @@ extern int __time64_support attribute_hidden;
- static inline bool
- supports_time64 (void)
- {
-+ return false;
- #ifdef __ASSUME_TIME64_SYSCALLS
- return true;
- #else
-diff --git a/sysdeps/unix/sysv/linux/timer_gettime.c b/sysdeps/unix/sysv/linux/timer_gettime.c
-index 193fe3b140..782387bba9 100644
---- a/sysdeps/unix/sysv/linux/timer_gettime.c
-+++ b/sysdeps/unix/sysv/linux/timer_gettime.c
-@@ -31,7 +31,8 @@ __timer_gettime64 (timer_t timerid, struct __itimerspec64 *value)
- #ifndef __NR_timer_gettime64
- # define __NR_timer_gettime64 __NR_timer_gettime
- #endif
-- int ret = INLINE_SYSCALL_CALL (timer_gettime64, ktimerid, value);
-+ int ret = -1; //INLINE_SYSCALL_CALL (timer_gettime64, ktimerid, value);
-+ errno = ENOSYS;
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (ret == 0 || errno != ENOSYS)
- return ret;
-diff --git a/sysdeps/unix/sysv/linux/timer_settime.c b/sysdeps/unix/sysv/linux/timer_settime.c
-index f8bb16a4c2..24aa17f1bf 100644
---- a/sysdeps/unix/sysv/linux/timer_settime.c
-+++ b/sysdeps/unix/sysv/linux/timer_settime.c
-@@ -38,8 +38,7 @@ __timer_settime64 (timer_t timerid, int flags,
- ovalue);
- #else
- # ifdef __NR_timer_settime64
-- int ret = INLINE_SYSCALL_CALL (timer_settime64, ktimerid, flags, value,
-- ovalue);
-+ int ret = ENOSYS; //INLINE_SYSCALL_CALL (timer_settime64, ktimerid, flags, value, ovalue);
- if (ret == 0 || errno != ENOSYS)
- return ret;
- # endif
-diff --git a/sysdeps/unix/sysv/linux/timerfd_gettime.c b/sysdeps/unix/sysv/linux/timerfd_gettime.c
-index 89f8066b91..e11cf663ba 100644
---- a/sysdeps/unix/sysv/linux/timerfd_gettime.c
-+++ b/sysdeps/unix/sysv/linux/timerfd_gettime.c
-@@ -32,7 +32,8 @@ __timerfd_gettime64 (int fd, struct __itimerspec64 *value)
- return INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
- #else
- # ifdef __NR_timerfd_gettime64
-- int ret = INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
-+ int ret = -1; //INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
-+ errno = ENOSYS;
- if (ret == 0 || errno != ENOSYS)
- return ret;
- # endif
-diff --git a/sysdeps/unix/sysv/linux/timerfd_settime.c b/sysdeps/unix/sysv/linux/timerfd_settime.c
-index 0dd6fa026e..3f57b84cb4 100644
---- a/sysdeps/unix/sysv/linux/timerfd_settime.c
-+++ b/sysdeps/unix/sysv/linux/timerfd_settime.c
-@@ -29,7 +29,8 @@ __timerfd_settime64 (int fd, int flags, const struct __itimerspec64 *value,
- #ifndef __NR_timerfd_settime64
- # define __NR_timerfd_settime64 __NR_timerfd_settime
- #endif
-- int ret = INLINE_SYSCALL_CALL (timerfd_settime64, fd, flags, value, ovalue);
-+ int ret = -1; //INLINE_SYSCALL_CALL (timerfd_settime64, fd, flags, value, ovalue);
-+ errno = ENOSYS;
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (ret == 0 || errno != ENOSYS)
- return ret;
-diff --git a/sysdeps/unix/sysv/linux/utimensat.c b/sysdeps/unix/sysv/linux/utimensat.c
-index 909a29762b..8115e62868 100644
---- a/sysdeps/unix/sysv/linux/utimensat.c
-+++ b/sysdeps/unix/sysv/linux/utimensat.c
-@@ -31,7 +31,8 @@ __utimensat64_helper (int fd, const char *file,
- #ifndef __NR_utimensat_time64
- # define __NR_utimensat_time64 __NR_utimensat
- #endif
-- int ret = INLINE_SYSCALL_CALL (utimensat_time64, fd, file, &tsp64[0], flags);
-+ int ret = -1; //INLINE_SYSCALL_CALL (utimensat_time64, fd, file, &tsp64[0], flags);
-+ errno = ENOSYS;
- #ifndef __ASSUME_TIME64_SYSCALLS
- if (ret == 0 || errno != ENOSYS)
- return ret;
diff --git a/glibc-linux4.patch b/glibc-linux4.patch
new file mode 100644
index 000000000000..87d87982ff07
--- /dev/null
+++ b/glibc-linux4.patch
@@ -0,0 +1,317 @@
+diff --git a/nptl/futex-internal.c b/nptl/futex-internal.c
+index 7ec228e8fb..e7d5058eeb 100644
+--- a/nptl/futex-internal.c
++++ b/nptl/futex-internal.c
+@@ -54,13 +54,9 @@ __futex_abstimed_wait_common64 (unsigned int* futex_word,
+ int private, bool cancel)
+ {
+ if (cancel)
+- return INTERNAL_SYSCALL_CANCEL (futex_time64, futex_word, op, expected,
+- abstime, NULL /* Unused. */,
+- FUTEX_BITSET_MATCH_ANY);
++ return -ENOSYS; // INTERNAL_SYSCALL_CANCEL (futex_time64, futex_word, op, expected, abstime, NULL /* Unused. */, FUTEX_BITSET_MATCH_ANY);
+ else
+- return INTERNAL_SYSCALL_CALL (futex_time64, futex_word, op, expected,
+- abstime, NULL /* Ununsed. */,
+- FUTEX_BITSET_MATCH_ANY);
++ return -ENOSYS; // INTERNAL_SYSCALL_CALL (futex_time64, futex_word, op, expected, abstime, NULL /* Ununsed. */, FUTEX_BITSET_MATCH_ANY);
+ }
+
+ static int
+diff --git a/sysdeps/unix/sysv/linux/clock_adjtime.c b/sysdeps/unix/sysv/linux/clock_adjtime.c
+index 5ded82f506..0955222329 100644
+--- a/sysdeps/unix/sysv/linux/clock_adjtime.c
++++ b/sysdeps/unix/sysv/linux/clock_adjtime.c
+@@ -29,7 +29,8 @@ __clock_adjtime64 (const clockid_t clock_id, struct __timex64 *tx64)
+ #ifndef __NR_clock_adjtime64
+ # define __NR_clock_adjtime64 __NR_clock_adjtime
+ #endif
+- int r = INLINE_SYSCALL_CALL (clock_adjtime64, clock_id, tx64);
++ int r = -1; // INLINE_SYSCALL_CALL (clock_adjtime64, clock_id, tx64);
++ errno = ENOSYS;
+ #ifndef __ASSUME_TIME64_SYSCALLS
+ if (r >= 0 || errno != ENOSYS)
+ return r;
+diff --git a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
+index 5534127ed7..7ec0690061 100644
+--- a/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
++++ b/sysdeps/unix/sysv/linux/clock_getcpuclockid.c
+@@ -34,7 +34,7 @@ __clock_getcpuclockid (pid_t pid, clockid_t *clock_id)
+ #ifndef __NR_clock_getres_time64
+ # define __NR_clock_getres_time64 __NR_clock_getres
+ #endif
+- int r = INTERNAL_SYSCALL_CALL (clock_getres_time64, pidclock, NULL);
++ int r = -ENOSYS; // INTERNAL_SYSCALL_CALL (clock_getres_time64, pidclock, NULL);
+
+ #ifndef __ASSUME_TIME64_SYSCALLS
+ if (r != 0 && r == -ENOSYS)
+diff --git a/sysdeps/unix/sysv/linux/clock_getres.c b/sysdeps/unix/sysv/linux/clock_getres.c
+index 38304db3cc..2b64c53d9f 100644
+--- a/sysdeps/unix/sysv/linux/clock_getres.c
++++ b/sysdeps/unix/sysv/linux/clock_getres.c
+@@ -35,9 +35,9 @@ __clock_getres64 (clockid_t clock_id, struct __timespec64 *res)
+ #endif
+
+ #ifdef HAVE_CLOCK_GETRES64_VSYSCALL
+- r = INLINE_VSYSCALL (clock_getres_time64, 2, clock_id, res);
++ r = ENOSYS; // INLINE_VSYSCALL (clock_getres_time64, 2, clock_id, res);
+ #else
+- r = INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res);
++ r = ENOSYS; // INLINE_SYSCALL_CALL (clock_getres_time64, clock_id, res);
+ #endif
+ if (r == 0 || errno != ENOSYS)
+ return r;
+diff --git a/sysdeps/unix/sysv/linux/clock_nanosleep.c b/sysdeps/unix/sysv/linux/clock_nanosleep.c
+index befe6ecb8c..f9692363c6 100644
+--- a/sysdeps/unix/sysv/linux/clock_nanosleep.c
++++ b/sysdeps/unix/sysv/linux/clock_nanosleep.c
+@@ -50,8 +50,7 @@ __clock_nanosleep_time64 (clockid_t clock_id, int flags,
+ #else
+ if (!in_time_t_range (req->tv_sec))
+ {
+- r = INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id, flags,
+- req, rem);
++ r = -ENOSYS; // INTERNAL_SYSCALL_CANCEL (clock_nanosleep_time64, clock_id, flags, req, rem);
+ if (r == -ENOSYS)
+ r = -EOVERFLOW;
+ }
+diff --git a/sysdeps/unix/sysv/linux/clock_settime.c b/sysdeps/unix/sysv/linux/clock_settime.c
+index 2a32e2eb13..0c15ef3260 100644
+--- a/sysdeps/unix/sysv/linux/clock_settime.c
++++ b/sysdeps/unix/sysv/linux/clock_settime.c
+@@ -35,7 +35,8 @@ __clock_settime64 (clockid_t clock_id, const struct __timespec64 *tp)
+ #ifndef __NR_clock_settime64
+ # define __NR_clock_settime64 __NR_clock_settime
+ #endif
+- int ret = INLINE_SYSCALL_CALL (clock_settime64, clock_id, tp);
++ int ret = -1; // INLINE_SYSCALL_CALL (clock_settime64, clock_id, tp);
++ errno = ENOSYS;
+
+ #ifndef __ASSUME_TIME64_SYSCALLS
+ if (ret == 0 || errno != ENOSYS)
+diff --git a/sysdeps/unix/sysv/linux/faccessat.c b/sysdeps/unix/sysv/linux/faccessat.c
+index 59ee4b6f8b..e80f431f95 100644
+--- a/sysdeps/unix/sysv/linux/faccessat.c
++++ b/sysdeps/unix/sysv/linux/faccessat.c
+@@ -26,7 +26,8 @@
+ int
+ __faccessat (int fd, const char *file, int mode, int flag)
+ {
+- int ret = INLINE_SYSCALL_CALL (faccessat2, fd, file, mode, flag);
++ int ret = -1; // INLINE_SYSCALL_CALL (faccessat2, fd, file, mode, flag);
++ errno = ENOSYS;
+ #if __ASSUME_FACCESSAT2
+ return ret;
+ #else
+diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
+index 74adc3956b..da28b563c7 100644
+--- a/sysdeps/unix/sysv/linux/kernel-features.h
++++ b/sysdeps/unix/sysv/linux/kernel-features.h
+@@ -203,7 +203,7 @@
+ #if __LINUX_KERNEL_VERSION >= 0x050100 \
+ || __WORDSIZE == 64 \
+ || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64)
+-# define __ASSUME_TIME64_SYSCALLS 1
++# define NO_ASSUME_TIME64_SYSCALLS 1
+ #endif
+
+ /* Linux waitid prior kernel 5.4 does not support waiting for the current
+@@ -215,7 +215,7 @@
+ /* The faccessat2 system call was introduced across all architectures
+ in Linux 5.8. */
+ #if __LINUX_KERNEL_VERSION >= 0x050800
+-# define __ASSUME_FACCESSAT2 1
++# define __ASSUME_FACCESSAT2 0
+ #else
+ # define __ASSUME_FACCESSAT2 0
+ #endif
+diff --git a/sysdeps/unix/sysv/linux/mq_timedreceive.c b/sysdeps/unix/sysv/linux/mq_timedreceive.c
+index 834cd7a484..59554e535e 100644
+--- a/sysdeps/unix/sysv/linux/mq_timedreceive.c
++++ b/sysdeps/unix/sysv/linux/mq_timedreceive.c
+@@ -39,8 +39,8 @@ ___mq_timedreceive_time64 (mqd_t mqdes, char *__restrict msg_ptr, size_t msg_len
+ && !in_time_t_range (abs_timeout->tv_sec);
+ if (need_time64)
+ {
+- int r = SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len,
+- msg_prio, abs_timeout);
++ int r = -1; // SYSCALL_CANCEL (mq_timedreceive_time64, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout);
++ errno = ENOSYS;
+ if (r == 0 || errno != ENOSYS)
+ return r;
+ __set_errno (EOVERFLOW);
+diff --git a/sysdeps/unix/sysv/linux/mq_timedsend.c b/sysdeps/unix/sysv/linux/mq_timedsend.c
+index 3ca5050976..753ffbb328 100644
+--- a/sysdeps/unix/sysv/linux/mq_timedsend.c
++++ b/sysdeps/unix/sysv/linux/mq_timedsend.c
+@@ -39,8 +39,8 @@ ___mq_timedsend_time64 (mqd_t mqdes, const char *msg_ptr, size_t msg_len,
+ && !in_time_t_range (abs_timeout->tv_sec);
+ if (need_time64)
+ {
+- int r = SYSCALL_CANCEL (mq_timedsend_time64, mqdes, msg_ptr, msg_len,
+- msg_prio, abs_timeout);
++ int r = -1; // SYSCALL_CANCEL (mq_timedsend_time64, mqdes, msg_ptr, msg_len, msg_prio, abs_timeout);
++ errno = ENOSYS;
+ if (r == 0 || errno != ENOSYS)
+ return r;
+ __set_errno (EOVERFLOW);
+diff --git a/sysdeps/unix/sysv/linux/ppoll.c b/sysdeps/unix/sysv/linux/ppoll.c
+index 1105e29b00..3d5d7e3157 100644
+--- a/sysdeps/unix/sysv/linux/ppoll.c
++++ b/sysdeps/unix/sysv/linux/ppoll.c
+@@ -46,8 +46,8 @@ __ppoll64 (struct pollfd *fds, nfds_t nfds, const struct __timespec64 *timeout,
+ bool need_time64 = timeout != NULL && !in_time_t_range (timeout->tv_sec);
+ if (need_time64)
+ {
+- ret = SYSCALL_CANCEL (ppoll_time64, fds, nfds, timeout, sigmask,
+- __NSIG_BYTES);
++ ret = -1; // SYSCALL_CANCEL (ppoll_time64, fds, nfds, timeout, sigmask, __NSIG_BYTES);
++ errno = ENOSYS;
+ if (ret == 0 || errno != ENOSYS)
+ return ret;
+ __set_errno (EOVERFLOW);
+diff --git a/sysdeps/unix/sysv/linux/pselect.c b/sysdeps/unix/sysv/linux/pselect.c
+index eba1c111f8..2a522d4e80 100644
+--- a/sysdeps/unix/sysv/linux/pselect.c
++++ b/sysdeps/unix/sysv/linux/pselect.c
+@@ -59,8 +59,8 @@ __pselect64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ bool need_time64 = timeout != NULL && !in_time_t_range (timeout->tv_sec);
+ if (need_time64)
+ {
+- int r = pselect64_syscall (nfds, readfds, writefds, exceptfds, timeout,
+- sigmask);
++ int r = -1; // pselect64_syscall (nfds, readfds, writefds, exceptfds, timeout, sigmask);
++ errno = ENOSYS;
+ if (r == 0 || errno != ENOSYS)
+ return r;
+ __set_errno (EOVERFLOW);
+diff --git a/sysdeps/unix/sysv/linux/recvmmsg.c b/sysdeps/unix/sysv/linux/recvmmsg.c
+index d9664d61c4..1775c1d38f 100644
+--- a/sysdeps/unix/sysv/linux/recvmmsg.c
++++ b/sysdeps/unix/sysv/linux/recvmmsg.c
+@@ -26,8 +26,8 @@ recvmmsg_syscall (int fd, struct mmsghdr *vmessages, unsigned int vlen,
+ #ifndef __NR_recvmmsg_time64
+ # define __NR_recvmmsg_time64 __NR_recvmmsg
+ #endif
+- int r = SYSCALL_CANCEL (recvmmsg_time64, fd, vmessages, vlen, flags,
+- timeout);
++ int r = -1; // SYSCALL_CANCEL (recvmmsg_time64, fd, vmessages, vlen, flags, timeout);
++ errno = ENOSYS;
+ #ifndef __ASSUME_TIME64_SYSCALLS
+ if (r >= 0 || errno != ENOSYS)
+ return r;
+diff --git a/sysdeps/unix/sysv/linux/sched_rr_gi.c b/sysdeps/unix/sysv/linux/sched_rr_gi.c
+index 19abc995b9..2426cba814 100644
+--- a/sysdeps/unix/sysv/linux/sched_rr_gi.c
++++ b/sysdeps/unix/sysv/linux/sched_rr_gi.c
+@@ -28,7 +28,8 @@ __sched_rr_get_interval64 (pid_t pid, struct __timespec64 *tp)
+ #ifndef __NR_sched_rr_get_interval_time64
+ # define __NR_sched_rr_get_interval_time64 __NR_sched_rr_get_interval
+ #endif
+- int ret = INLINE_SYSCALL_CALL (sched_rr_get_interval_time64, pid, tp);
++ int ret = -1; // INLINE_SYSCALL_CALL (sched_rr_get_interval_time64, pid, tp);
++ errno = ENOSYS;
+ #ifndef __ASSUME_TIME64_SYSCALLS
+ if (ret == 0 || errno != ENOSYS)
+ return ret;
+diff --git a/sysdeps/unix/sysv/linux/select.c b/sysdeps/unix/sysv/linux/select.c
+index 3bc8b0cc3d..c197545c31 100644
+--- a/sysdeps/unix/sysv/linux/select.c
++++ b/sysdeps/unix/sysv/linux/select.c
+@@ -75,8 +75,8 @@ __select64 (int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
+ bool need_time64 = timeout != NULL && !in_time_t_range (timeout->tv_sec);
+ if (need_time64)
+ {
+- int r = SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds,
+- exceptfds, pts64, NULL);
++ int r = -1; // SYSCALL_CANCEL (pselect6_time64, nfds, readfds, writefds, exceptfds, pts64, NULL);
++ errno = ENOSYS;
+ if ((r >= 0 || errno != ENOSYS) && timeout != NULL)
+ {
+ TIMESPEC_TO_TIMEVAL (timeout, &ts64);
+diff --git a/sysdeps/unix/sysv/linux/semtimedop.c b/sysdeps/unix/sysv/linux/semtimedop.c
+index 38a401bb6f..8f2e7ea99b 100644
+--- a/sysdeps/unix/sysv/linux/semtimedop.c
++++ b/sysdeps/unix/sysv/linux/semtimedop.c
+@@ -45,7 +45,8 @@ __semtimedop64 (int semid, struct sembuf *sops, size_t nsops,
+ bool need_time64 = timeout != NULL && !in_time_t_range (timeout->tv_sec);
+ if (need_time64)
+ {
+- int r = semtimedop_syscall (semid, sops, nsops, timeout);
++ int r = -1; // semtimedop_syscall (semid, sops, nsops, timeout);
++ errno = ENOSYS;
+ if (r == 0 || errno != ENOSYS)
+ return r;
+ __set_errno (EOVERFLOW);
+diff --git a/sysdeps/unix/sysv/linux/timer_gettime.c b/sysdeps/unix/sysv/linux/timer_gettime.c
+index 3ac39979da..aca910450e 100644
+--- a/sysdeps/unix/sysv/linux/timer_gettime.c
++++ b/sysdeps/unix/sysv/linux/timer_gettime.c
+@@ -32,7 +32,8 @@ ___timer_gettime64 (timer_t timerid, struct __itimerspec64 *value)
+ # ifndef __NR_timer_gettime64
+ # define __NR_timer_gettime64 __NR_timer_gettime
+ # endif
+- int ret = INLINE_SYSCALL_CALL (timer_gettime64, ktimerid, value);
++ int ret = -1; // INLINE_SYSCALL_CALL (timer_gettime64, ktimerid, value);
++ errno = ENOSYS;
+ # ifndef __ASSUME_TIME64_SYSCALLS
+ if (ret == 0 || errno != ENOSYS)
+ return ret;
+diff --git a/sysdeps/unix/sysv/linux/timer_settime.c b/sysdeps/unix/sysv/linux/timer_settime.c
+index 518fed9c59..6f4b8fd699 100644
+--- a/sysdeps/unix/sysv/linux/timer_settime.c
++++ b/sysdeps/unix/sysv/linux/timer_settime.c
+@@ -39,8 +39,7 @@ ___timer_settime64 (timer_t timerid, int flags,
+ ovalue);
+ # else
+ # ifdef __NR_timer_settime64
+- int ret = INLINE_SYSCALL_CALL (timer_settime64, ktimerid, flags, value,
+- ovalue);
++ int ret = ENOSYS; // INLINE_SYSCALL_CALL (timer_settime64, ktimerid, flags, value, ovalue);
+ if (ret == 0 || errno != ENOSYS)
+ return ret;
+ # endif
+diff --git a/sysdeps/unix/sysv/linux/timerfd_gettime.c b/sysdeps/unix/sysv/linux/timerfd_gettime.c
+index 9bd0e02621..989f24eff3 100644
+--- a/sysdeps/unix/sysv/linux/timerfd_gettime.c
++++ b/sysdeps/unix/sysv/linux/timerfd_gettime.c
+@@ -32,7 +32,8 @@ __timerfd_gettime64 (int fd, struct __itimerspec64 *value)
+ #ifdef __ASSUME_TIME64_SYSCALLS
+ return INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
+ #else
+- int ret = INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
++ int ret = -1; // INLINE_SYSCALL_CALL (timerfd_gettime64, fd, value);
++ errno = ENOSYS;
+ if (ret == 0 || errno != ENOSYS)
+ return ret;
+ struct itimerspec its32;
+diff --git a/sysdeps/unix/sysv/linux/timerfd_settime.c b/sysdeps/unix/sysv/linux/timerfd_settime.c
+index 59282bf1ad..bdd4e31171 100644
+--- a/sysdeps/unix/sysv/linux/timerfd_settime.c
++++ b/sysdeps/unix/sysv/linux/timerfd_settime.c
+@@ -37,8 +37,8 @@ __timerfd_settime64 (int fd, int flags, const struct __itimerspec64 *value,
+ || !in_time_t_range (value->it_interval.tv_sec);
+ if (need_time64)
+ {
+- int r = INLINE_SYSCALL_CALL (timerfd_settime64, fd, flags, value,
+- ovalue);
++ int r = -1; // INLINE_SYSCALL_CALL (timerfd_settime64, fd, flags, value, ovalue);
++ errno = ENOSYS;
+ if (r == 0 || errno != ENOSYS)
+ return r;
+ __set_errno (EOVERFLOW);
+diff --git a/sysdeps/unix/sysv/linux/utimensat.c b/sysdeps/unix/sysv/linux/utimensat.c
+index 5662ecc9aa..25bc1e9c58 100644
+--- a/sysdeps/unix/sysv/linux/utimensat.c
++++ b/sysdeps/unix/sysv/linux/utimensat.c
+@@ -46,8 +46,8 @@ __utimensat64_helper (int fd, const char *file,
+ && !in_time_t_range (tsp64[1].tv_sec)));
+ if (need_time64)
+ {
+- int r = INLINE_SYSCALL_CALL (utimensat_time64, fd, file, &tsp64[0],
+- flags);
++ int r = -1; // INLINE_SYSCALL_CALL (utimensat_time64, fd, file, &tsp64[0], flags);
++ errno = ENOSYS;
+ if (r == 0 || errno != ENOSYS)
+ return r;
+ __set_errno (EOVERFLOW);
diff --git a/locale.gen.txt b/locale.gen.txt
index ccdd817342c7..4b9e0c479a8f 100644
--- a/locale.gen.txt
+++ b/locale.gen.txt
@@ -10,9 +10,8 @@
# and <charset> is one of the character sets listed in /usr/share/i18n/charmaps
#
# Examples:
-# en_US ISO-8859-1
-# en_US.UTF-8 UTF-8
-# de_DE ISO-8859-1
+# en_US UTF-8
+# de_DE UTF-8
# de_DE@euro ISO-8859-15
#
# The locale-gen command will generate all the locales,