diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-19 16:49:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-19 16:51:12 +0100 |
commit | b9c0b3f126472b144c543d8d77a8047e8d905ada (patch) | |
tree | 2ad99b8789bcb62b993ed18d2877905f7f02bdac /nixpkgs/pkgs/development/libraries/glibc | |
parent | 67419f0e56f99b0ebbe14574d3492110ac84c8d6 (diff) | |
parent | c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad (diff) | |
download | nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar.gz nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar.bz2 nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar.lz nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar.xz nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.tar.zst nixlib-b9c0b3f126472b144c543d8d77a8047e8d905ada.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs into HEAD
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix nixpkgs/pkgs/top-level/perl-packages.nix
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/glibc')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/glibc/0001-aarch64-math-vector.h-add-NVCC-include-guard.patch | 37 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz | bin | 32759 -> 35936 bytes | |||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/glibc/common.nix | 18 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/glibc/default.nix | 4 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/glibc/locales-builder.sh | 2 |
5 files changed, 56 insertions, 5 deletions
diff --git a/nixpkgs/pkgs/development/libraries/glibc/0001-aarch64-math-vector.h-add-NVCC-include-guard.patch b/nixpkgs/pkgs/development/libraries/glibc/0001-aarch64-math-vector.h-add-NVCC-include-guard.patch new file mode 100644 index 000000000000..234bc1943c9a --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/glibc/0001-aarch64-math-vector.h-add-NVCC-include-guard.patch @@ -0,0 +1,37 @@ +From 44d0a3a9bd8c6fe59f6ccb44206a50a900bfcf4a Mon Sep 17 00:00:00 2001 +From: Connor Baker <connor.baker@tweag.io> +Date: Tue, 31 Oct 2023 14:30:24 +0000 +Subject: [PATCH] aarch64/math-vector.h: add NVCC include guard + +--- + sysdeps/aarch64/fpu/bits/math-vector.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/sysdeps/aarch64/fpu/bits/math-vector.h b/sysdeps/aarch64/fpu/bits/math-vector.h +index 7c200599c1..583a426494 100644 +--- a/sysdeps/aarch64/fpu/bits/math-vector.h ++++ b/sysdeps/aarch64/fpu/bits/math-vector.h +@@ -25,17 +25,17 @@ + /* Get default empty definitions for simd declarations. */ + #include <bits/libm-simd-decl-stubs.h> + +-#if __GNUC_PREREQ(9, 0) ++#if __GNUC_PREREQ(9, 0) && !defined(__CUDACC__) + # define __ADVSIMD_VEC_MATH_SUPPORTED + typedef __Float32x4_t __f32x4_t; + typedef __Float64x2_t __f64x2_t; +-#elif __glibc_clang_prereq(8, 0) ++#elif __glibc_clang_prereq(8, 0) && !defined(__CUDACC__) + # define __ADVSIMD_VEC_MATH_SUPPORTED + typedef __attribute__ ((__neon_vector_type__ (4))) float __f32x4_t; + typedef __attribute__ ((__neon_vector_type__ (2))) double __f64x2_t; + #endif + +-#if __GNUC_PREREQ(10, 0) || __glibc_clang_prereq(11, 0) ++#if (__GNUC_PREREQ(10, 0) || __glibc_clang_prereq(11, 0)) && !defined(__CUDACC__) + # define __SVE_VEC_MATH_SUPPORTED + typedef __SVFloat32_t __sv_f32_t; + typedef __SVFloat64_t __sv_f64_t; +-- +2.42.0 + diff --git a/nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz b/nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz index 4eb3c7b2cdb3..6414956807f4 100644 --- a/nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz +++ b/nixpkgs/pkgs/development/libraries/glibc/2.38-master.patch.gz Binary files differdiff --git a/nixpkgs/pkgs/development/libraries/glibc/common.nix b/nixpkgs/pkgs/development/libraries/glibc/common.nix index 51d8a4dbe05c..3e17817c0bab 100644 --- a/nixpkgs/pkgs/development/libraries/glibc/common.nix +++ b/nixpkgs/pkgs/development/libraries/glibc/common.nix @@ -44,7 +44,7 @@ let version = "2.38"; - patchSuffix = "-23"; + patchSuffix = "-27"; sha256 = "sha256-+4KZiZiyspllRnvBtp0VLpwwfSzzAcnq+0VVt3DvP9I="; in @@ -60,7 +60,7 @@ stdenv.mkDerivation ({ [ /* No tarballs for stable upstream branch, only https://sourceware.org/git/glibc.git and using git would complicate bootstrapping. $ git fetch --all -p && git checkout origin/release/2.38/master && git describe - glibc-2.38-23-g0e1ef6779a + glibc-2.38-27-g750a45a783 $ git show --minimal --reverse glibc-2.38.. | gzip -9n --rsyncable - > 2.38-master.patch.gz To compare the archive contents zdiff can be used. @@ -97,6 +97,18 @@ stdenv.mkDerivation ({ */ ./reenable_DT_HASH.patch ] + /* NVCC does not support ARM intrinsics. Since <math.h> is pulled in by almost + every HPC piece of software, without this patch CUDA compilation on ARM + is effectively broken. See + https://forums.developer.nvidia.com/t/nvcc-fails-to-build-with-arm-neon-instructions-cpp-vs-cu/248355/2. + */ + ++ ( + let + isAarch64 = stdenv.buildPlatform.isAarch64 || stdenv.hostPlatform.isAarch64; + isLinux = stdenv.buildPlatform.isLinux || stdenv.hostPlatform.isLinux; + in + lib.optional (isAarch64 && isLinux) ./0001-aarch64-math-vector.h-add-NVCC-include-guard.patch + ) ++ lib.optional stdenv.hostPlatform.isMusl ./fix-rpc-types-musl-conflicts.patch ++ lib.optional stdenv.buildPlatform.isDarwin ./darwin-cross-build.patch; @@ -276,7 +288,7 @@ stdenv.mkDerivation ({ license = licenses.lgpl2Plus; - maintainers = with maintainers; [ eelco ma27 ]; + maintainers = with maintainers; [ eelco ma27 connorbaker ]; platforms = platforms.linux; } // (args.meta or {}); }) diff --git a/nixpkgs/pkgs/development/libraries/glibc/default.nix b/nixpkgs/pkgs/development/libraries/glibc/default.nix index 11676560e80b..be3bee081e73 100644 --- a/nixpkgs/pkgs/development/libraries/glibc/default.nix +++ b/nixpkgs/pkgs/development/libraries/glibc/default.nix @@ -154,7 +154,7 @@ in ln -sf $out/lib/libpthread.so.0 $out/lib/libpthread.so ln -sf $out/lib/librt.so.1 $out/lib/librt.so ln -sf $out/lib/libdl.so.2 $out/lib/libdl.so - ln -sf $out/lib/libutil.so.1 $out/lib/libutil.so + test -f $out/lib/libutil.so.1 && ln -sf $out/lib/libutil.so.1 $out/lib/libutil.so touch $out/lib/libpthread.a # Put libraries for static linking in a separate output. Note @@ -163,6 +163,8 @@ in mkdir -p $static/lib mv $out/lib/*.a $static/lib mv $static/lib/lib*_nonshared.a $out/lib + # If libutil.so.1 is missing, libutil.a is required. + test -f $out/lib/libutil.so.1 || mv $static/lib/libutil.a $out/lib # Some of *.a files are linker scripts where moving broke the paths. sed "/^GROUP/s|$out/lib/lib|$static/lib/lib|g" \ -i "$static"/lib/*.a diff --git a/nixpkgs/pkgs/development/libraries/glibc/locales-builder.sh b/nixpkgs/pkgs/development/libraries/glibc/locales-builder.sh index d91f936c937b..27894b09b91c 100644 --- a/nixpkgs/pkgs/development/libraries/glibc/locales-builder.sh +++ b/nixpkgs/pkgs/development/libraries/glibc/locales-builder.sh @@ -1,4 +1,4 @@ -if [ -e .attrs.sh ]; then source .attrs.sh; fi +if [ -e "$NIX_ATTRS_SH_FILE" ]; then . "$NIX_ATTRS_SH_FILE"; elif [ -f .attrs.sh ]; then . .attrs.sh; fi # Glibc cannot have itself in its RPATH. export NIX_NO_SELF_RPATH=1 |