diff options
Diffstat (limited to 'pkgs/development/compilers')
8 files changed, 69 insertions, 46 deletions
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index b3d0f8d5d502e..571d0b023124c 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -154,7 +154,10 @@ stdenv.mkDerivation ({ hardeningDisable = [ "format" "pie" ]; - outputs = if langJava || langGo then ["out" "man" "info"] + # When targetting darwin, libgcc_ext.10.{4,5}.dylib are created as + # MH_DYLIB_STUB files, which install_name_tool can't change, so we + # get a cycle between $out and $lib. + outputs = if langJava || langGo || targetPlatform.isDarwin then ["out" "man" "info"] else [ "out" "lib" "man" "info" ]; setOutputFlags = false; NIX_NO_SELF_RPATH = true; @@ -328,7 +331,6 @@ stdenv.mkDerivation ({ maintainers = with lib.maintainers; [ veprbl ]; platforms = lib.platforms.unix; - badPlatforms = lib.platforms.darwin; }; } diff --git a/pkgs/development/compilers/gcc/common/pre-configure.nix b/pkgs/development/compilers/gcc/common/pre-configure.nix index d9977e0ba2f9e..310e7f8b574bd 100644 --- a/pkgs/development/compilers/gcc/common/pre-configure.nix +++ b/pkgs/development/compilers/gcc/common/pre-configure.nix @@ -6,14 +6,16 @@ , langGo }: assert langJava -> lib.versionOlder version "7"; -assert langAda -> gnatboot != null; - -lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' +assert langAda -> gnatboot != null; let + needsLib + = (lib.versionOlder version "7" && (langJava || langGo)) + || (lib.versions.major version == "4" && lib.versions.minor version == "9" && targetPlatform.isDarwin); +in lib.optionalString (hostPlatform.isSunOS && hostPlatform.is64bit) '' export NIX_LDFLAGS=`echo $NIX_LDFLAGS | sed -e s~$prefix/lib~$prefix/lib/amd64~g` export LDFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $LDFLAGS_FOR_TARGET" export CXXFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CXXFLAGS_FOR_TARGET" export CFLAGS_FOR_TARGET="-Wl,-rpath,$prefix/lib/amd64 $CFLAGS_FOR_TARGET" -'' + lib.optionalString (lib.versionOlder version "7" && (langJava || langGo)) '' +'' + lib.optionalString needsLib '' export lib=$out; '' + lib.optionalString langAda '' export PATH=${gnatboot}/bin:$PATH diff --git a/pkgs/development/compilers/hare/disable-failing-test-cases.patch b/pkgs/development/compilers/hare/disable-failing-test-cases.patch new file mode 100644 index 0000000000000..4f8ba6056046d --- /dev/null +++ b/pkgs/development/compilers/hare/disable-failing-test-cases.patch @@ -0,0 +1,37 @@ +diff --git a/math/complex/+test.ha b/math/complex/+test.ha +index a1cc0916..705a0a41 100644 +--- a/math/complex/+test.ha ++++ b/math/complex/+test.ha +@@ -567,8 +567,8 @@ const TEST_COSSC: [](c128, c128) = [ + (math::INF, math::NAN)), // real sign unspecified + ((math::INF, math::NAN), + (math::NAN, math::NAN)), +- ((math::NAN, 0f64), +- (math::NAN, -0f64)), // imaginary sign unspecified ++// ((math::NAN, 0f64), ++// (math::NAN, -0f64)), // imaginary sign unspecified + ((math::NAN, 1f64), + (math::NAN, math::NAN)), + ((math::NAN, math::INF), +@@ -583,8 +583,8 @@ const TEST_COSHSC: [](c128, c128) = [ + (1f64, 0f64)), + ((0f64, math::INF), + (math::NAN, 0f64)), // imaginary sign unspecified +- ((0f64, math::NAN), +- (math::NAN, 0f64)), // imaginary sign unspecified ++// ((0f64, math::NAN), ++// (math::NAN, 0f64)), // imaginary sign unspecified + ((1f64, math::INF), + (math::NAN, math::NAN)), + ((1f64, math::NAN), +@@ -627,8 +627,8 @@ const TEST_EXPSC: [](c128, c128) = [ + (0f64, 0f64)), // real and imaginary sign unspecified + ((math::INF, math::INF), + (math::INF, math::NAN)), // real sign unspecified +- ((-math::INF, math::NAN), +- (0f64, 0f64)), // real and imaginary sign unspecified ++// ((-math::INF, math::NAN), ++// (0f64, 0f64)), // real and imaginary sign unspecified + ((math::INF, math::NAN), + (math::INF, math::NAN)), // real sign unspecified + ((math::NAN, 0f64), diff --git a/pkgs/development/compilers/hare/hare.nix b/pkgs/development/compilers/hare/hare.nix index f5c0cd8e405f5..e24fc68ab4228 100644 --- a/pkgs/development/compilers/hare/hare.nix +++ b/pkgs/development/compilers/hare/hare.nix @@ -11,16 +11,18 @@ stdenv.mkDerivation rec { pname = "hare"; - version = "0.pre+date=2022-04-27"; + version = "unstable-2022-06-18"; src = fetchFromSourcehut { name = pname + "-src"; owner = "~sircmpwn"; repo = pname; - rev = "1bfb2e6dee850c675a8831b41420800d3c62c2a0"; - hash = "sha256-1b7U5u3PM3jmnH/OnY9O++GTPyVOdFkJ0fwJBoDZgSU="; + rev = "ac9b2c35c09d555e09dbd81c5ed95bdfa14313ba"; + hash = "sha256-eeS14LGkbi9IamvKzK+HF0Rvk9NFp4QVYcrHwNSNBx4="; }; + patches = [ ./disable-failing-test-cases.patch ]; + nativeBuildInputs = [ binutils-unwrapped harec @@ -35,6 +37,7 @@ stdenv.mkDerivation rec { qbe ]; + setupHook = ./setup-hook.sh; strictDeps = true; configurePhase = @@ -59,6 +62,7 @@ stdenv.mkDerivation rec { runHook preConfigure export HARECACHE="$NIX_BUILD_TOP/.harecache" + export BINOUT="$NIX_BUILD_TOP/.bin" cat ${config-file} > config.mk runHook postConfigure diff --git a/pkgs/development/compilers/hare/harec.nix b/pkgs/development/compilers/hare/harec.nix index a3ad53350b094..4c77a77bd0d1a 100644 --- a/pkgs/development/compilers/hare/harec.nix +++ b/pkgs/development/compilers/hare/harec.nix @@ -6,14 +6,14 @@ stdenv.mkDerivation rec { pname = "harec"; - version = "0.pre+date=2022-04-26"; + version = "unstable-2022-06-20"; src = fetchFromSourcehut { name = pname + "-src"; owner = "~sircmpwn"; repo = pname; - rev = "e5fb5176ba629e98ace5fcb3aa427b2c25d8fdf0"; - hash = "sha256-sqt3q6sarzrpyJ/1QYM1WTukrZpflAmAYq6pQwAwe18="; + rev = "2eccbc4b959a590dda91143c8487edda841106d9"; + hash = "sha256-pwy7cNxAqIbhx9kpcjfgk7sCEns9oA6zhKSQJdHLZCM="; }; nativeBuildInputs = [ diff --git a/pkgs/development/compilers/hare/setup-hook.sh b/pkgs/development/compilers/hare/setup-hook.sh new file mode 100644 index 0000000000000..999b91df122fa --- /dev/null +++ b/pkgs/development/compilers/hare/setup-hook.sh @@ -0,0 +1,11 @@ +export HARECACHE="$NIX_BUILD_TOP/.harecache" + +addHarepath () { + for haredir in third-party stdlib; do + if [[ -d "$1/src/hare/$haredir" ]]; then + addToSearchPath HAREPATH "$1/src/hare/$haredir" + fi + done +} + +addEnvHooks "$hostOffset" addHarepath diff --git a/pkgs/development/compilers/llvm/14/compiler-rt/armv7l.patch b/pkgs/development/compilers/llvm/14/compiler-rt/armv7l.patch deleted file mode 100644 index 120cfe6feb2a6..0000000000000 --- a/pkgs/development/compilers/llvm/14/compiler-rt/armv7l.patch +++ /dev/null @@ -1,32 +0,0 @@ -diff -ur compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake ---- compiler-rt-10.0.0.src/cmake/builtin-config-ix.cmake 2020-03-24 00:01:02.000000000 +0900 -+++ compiler-rt-10.0.0.src-patched/cmake/builtin-config-ix.cmake 2020-05-10 03:42:00.883450706 +0900 -@@ -24,7 +24,7 @@ - - - set(ARM64 aarch64) --set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k) -+set(ARM32 arm armhf armv6m armv7m armv7em armv7 armv7s armv7k armv7l) - set(HEXAGON hexagon) - set(X86 i386) - set(X86_64 x86_64) -diff -ur compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt ---- compiler-rt-10.0.0.src/lib/builtins/CMakeLists.txt 2020-03-24 00:01:02.000000000 +0900 -+++ compiler-rt-10.0.0.src-patched/lib/builtins/CMakeLists.txt 2020-05-10 03:44:49.468579650 +0900 -@@ -474,6 +474,7 @@ - set(armv7_SOURCES ${arm_SOURCES}) - set(armv7s_SOURCES ${arm_SOURCES}) - set(armv7k_SOURCES ${arm_SOURCES}) -+set(armv7l_SOURCES ${arm_SOURCES}) - set(arm64_SOURCES ${aarch64_SOURCES}) - - # macho_embedded archs -@@ -595,7 +596,7 @@ - foreach (arch ${BUILTIN_SUPPORTED_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)$") -+ if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7l|armv7m|armv7em)$") - string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}") - check_compile_definition(__VFP_FP__ "${CMAKE_C_FLAGS} ${_TARGET_${arch}_CFLAGS}" COMPILER_RT_HAS_${arch}_VFP) - if(NOT COMPILER_RT_HAS_${arch}_VFP) diff --git a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix index 59ca5348fed44..cddfd5c23806b 100644 --- a/pkgs/development/compilers/llvm/14/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/14/compiler-rt/default.nix @@ -73,8 +73,7 @@ stdenv.mkDerivation { # extra `/`. ./normalize-var.patch ] # Prevent a compilation error on darwin - ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin-targetconditionals.patch - ++ lib.optional stdenv.hostPlatform.isAarch32 ./armv7l.patch; + ++ lib.optional stdenv.hostPlatform.isDarwin ./darwin-targetconditionals.patch; # TSAN requires XPC on Darwin, which we have no public/free source files for. We can depend on the Apple frameworks # to get it, but they're unfree. Since LLVM is rather central to the stdenv, we patch out TSAN support so that Hydra |