diff options
author | Holger Wünsche <DieGoldeneEnte@users.noreply.github.com> | 2020-10-16 14:35:22 +0200 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2020-11-27 13:29:18 +0000 |
commit | 90e996ffd495fc1542f519f952436e9ed4169ca1 (patch) | |
tree | 3f56e89cbd77c9c08ebda32f69da23d33eff824f /nixpkgs/pkgs | |
parent | 0bff43d38e8c9e17c127beb815b74f7bfa3e6647 (diff) | |
download | nixlib-90e996ffd495fc1542f519f952436e9ed4169ca1.tar nixlib-90e996ffd495fc1542f519f952436e9ed4169ca1.tar.gz nixlib-90e996ffd495fc1542f519f952436e9ed4169ca1.tar.bz2 nixlib-90e996ffd495fc1542f519f952436e9ed4169ca1.tar.lz nixlib-90e996ffd495fc1542f519f952436e9ed4169ca1.tar.xz nixlib-90e996ffd495fc1542f519f952436e9ed4169ca1.tar.zst nixlib-90e996ffd495fc1542f519f952436e9ed4169ca1.zip |
llvmPackages_11.compiler-rt: enable support for i486 i586 i686
compiler-rt (and as a result clang) can't be build for i686 (as noticed here: #99984). The patch adds the required variables and should result in the same behavior as in the nixpkgs-llvm10. It essentially forces to use i386 buildins when using i486, i586 or i686, which are not supported. Fixes #100392 (cherry picked from commit 6948875e73a855b8a0c665301576dcd9653b9e15)
Diffstat (limited to 'nixpkgs/pkgs')
-rw-r--r-- | nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt-X86-support-extension.patch | 23 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt.nix | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt-X86-support-extension.patch b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt-X86-support-extension.patch new file mode 100644 index 000000000000..f6f9336ad5ad --- /dev/null +++ b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt-X86-support-extension.patch @@ -0,0 +1,23 @@ +diff --git a/lib/builtins/CMakeLists.txt b/lib/builtins/CMakeLists.txt +index 3a66dd9c3fb..7efc85d9f9f 100644 +--- a/lib/builtins/CMakeLists.txt ++++ b/lib/builtins/CMakeLists.txt +@@ -301,6 +301,10 @@ if (NOT MSVC) + i386/umoddi3.S + ) + ++ set(i486_SOURCES ${i386_SOURCES}) ++ set(i586_SOURCES ${i386_SOURCES}) ++ set(i686_SOURCES ${i386_SOURCES}) ++ + if (WIN32) + set(i386_SOURCES + ${i386_SOURCES} +@@ -608,6 +612,7 @@ else () + endif() + + foreach (arch ${BUILTIN_SUPPORTED_ARCH}) ++ message("arch: ${arch}") + if (CAN_TARGET_${arch}) + # For ARM archs, exclude any VFP builtins if VFP is not supported + if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em)$") diff --git a/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt.nix b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt.nix index e0cb712fe613..db1f93f86ab3 100644 --- a/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt.nix +++ b/nixpkgs/pkgs/development/compilers/llvm/11/compiler-rt.nix @@ -47,6 +47,7 @@ stdenv.mkDerivation rec { patches = [ ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory + ./compiler-rt-X86-support-extension.patch # Add support for i486 i586 i686 by reusing i386 config ]# ++ stdenv.lib.optional stdenv.hostPlatform.isMusl ./sanitizers-nongnu.patch ++ stdenv.lib.optional stdenv.hostPlatform.isAarch32 ./compiler-rt-armv7l.patch; |