diff --git a/pkgs/development/compilers/hip/default.nix b/pkgs/development/compilers/hip/default.nix index 5a7e9dd5a529..2153a30cb160 100644 --- a/pkgs/development/compilers/hip/default.nix +++ b/pkgs/development/compilers/hip/default.nix @@ -31,13 +31,13 @@ let hip = stdenv.mkDerivation rec { pname = "hip"; - version = "4.5.2"; + version = "5.0.2"; src = fetchFromGitHub { owner = "ROCm-Developer-Tools"; repo = "HIP"; rev = "rocm-${version}"; - sha256 = "sha256-AuA5ubRPywXaBBrjdHg5AT8rrVKULKog6Lh8jPaUcXY="; + hash = "sha256-w023vBLJaiFbRdvz9UfZLPasRjk3VqM9zwctCIJ5hGU="; }; # - fix bash paths @@ -68,14 +68,14 @@ let -e 's,`file,`${file}/bin/file,g' \ -e 's,`readelf,`${binutils-unwrapped}/bin/readelf,' \ -e 's, ar , ${binutils-unwrapped}/bin/ar ,g' \ - -i bin/hipcc + -i bin/hipcc.pl sed -e 's,^\($HSA_PATH=\).*$,\1"${rocm-runtime}";,' \ -e 's,^\($HIP_CLANG_PATH=\).*$,\1"${clang}/bin";,' \ -e 's,^\($HIP_PLATFORM=\).*$,\1"amd";,' \ -e 's,$HIP_CLANG_PATH/llc,${llvm}/bin/llc,' \ -e 's, abs_path, Cwd::abs_path,' \ - -i bin/hipconfig + -i bin/hipconfig.pl sed -e 's, abs_path, Cwd::abs_path,' -i bin/hipvars.pm ''; @@ -102,13 +102,13 @@ let in stdenv.mkDerivation rec { pname = "hip"; - version = "4.5.2"; + version = "5.0.2"; src = fetchFromGitHub { owner = "ROCm-Developer-Tools"; repo = "hipamd"; rev = "rocm-${version}"; - sha256 = "WvOuQu/EN81Kwcoc3ZtGlhb996edQJ3OWFsmPuqeNXE="; + hash = "sha256-hhTwKG0wDpbIBI8S61AhdNldX+STO8C66xi2EzmJSBs="; }; nativeBuildInputs = [ cmake python3 makeWrapper perl ]; @@ -135,6 +135,7 @@ stdenv.mkDerivation rec { "-DAMD_OPENCL_PATH=${rocm-opencl-runtime.src}" "-DHIP_COMMON_DIR=${hip}" "-DROCCLR_PATH=${rocclr}" + "-DHIP_VERSION_BUILD_ID=0" ]; postInstall = '' diff --git a/pkgs/development/compilers/llvm/rocm/compiler-rt/68d5235cb58f988c71b403334cd9482d663841ab.patch b/pkgs/development/compilers/llvm/rocm/compiler-rt/68d5235cb58f988c71b403334cd9482d663841ab.patch deleted file mode 100644 index 43803164a00f..000000000000 --- a/pkgs/development/compilers/llvm/rocm/compiler-rt/68d5235cb58f988c71b403334cd9482d663841ab.patch +++ /dev/null @@ -1,78 +0,0 @@ ---- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc -+++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc -@@ -370,15 +370,6 @@ - - #if SANITIZER_GLIBC - // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE -- _(CYGETDEFTHRESH, WRITE, sizeof(int)); -- _(CYGETDEFTIMEOUT, WRITE, sizeof(int)); -- _(CYGETMON, WRITE, struct_cyclades_monitor_sz); -- _(CYGETTHRESH, WRITE, sizeof(int)); -- _(CYGETTIMEOUT, WRITE, sizeof(int)); -- _(CYSETDEFTHRESH, NONE, 0); -- _(CYSETDEFTIMEOUT, NONE, 0); -- _(CYSETTHRESH, NONE, 0); -- _(CYSETTIMEOUT, NONE, 0); - _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz); - _(EQL_ENSLAVE, WRITE, struct_ifreq_sz); - _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz); ---- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp -+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp -@@ -143,7 +143,6 @@ - # include - #endif - #include --#include - #include - #include - #include -@@ -460,7 +459,6 @@ - - #if SANITIZER_GLIBC - unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct); -- unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor); - #if EV_VERSION > (0x010000) - unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry); - #else -@@ -824,15 +822,6 @@ - #endif // SANITIZER_LINUX - - #if SANITIZER_LINUX && !SANITIZER_ANDROID -- unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH; -- unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT; -- unsigned IOCTL_CYGETMON = CYGETMON; -- unsigned IOCTL_CYGETTHRESH = CYGETTHRESH; -- unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT; -- unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH; -- unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT; -- unsigned IOCTL_CYSETTHRESH = CYSETTHRESH; -- unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT; - unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE; - unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE; - unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG; ---- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h -+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h -@@ -983,7 +983,6 @@ - - #if SANITIZER_LINUX && !SANITIZER_ANDROID - extern unsigned struct_ax25_parms_struct_sz; --extern unsigned struct_cyclades_monitor_sz; - extern unsigned struct_input_keymap_entry_sz; - extern unsigned struct_ipx_config_data_sz; - extern unsigned struct_kbdiacrs_sz; -@@ -1328,15 +1327,6 @@ - #endif // SANITIZER_LINUX - - #if SANITIZER_LINUX && !SANITIZER_ANDROID --extern unsigned IOCTL_CYGETDEFTHRESH; --extern unsigned IOCTL_CYGETDEFTIMEOUT; --extern unsigned IOCTL_CYGETMON; --extern unsigned IOCTL_CYGETTHRESH; --extern unsigned IOCTL_CYGETTIMEOUT; --extern unsigned IOCTL_CYSETDEFTHRESH; --extern unsigned IOCTL_CYSETDEFTIMEOUT; --extern unsigned IOCTL_CYSETTHRESH; --extern unsigned IOCTL_CYSETTIMEOUT; - extern unsigned IOCTL_EQL_EMANCIPATE; - extern unsigned IOCTL_EQL_ENSLAVE; - extern unsigned IOCTL_EQL_GETMASTRCFG; diff --git a/pkgs/development/compilers/llvm/rocm/compiler-rt/compiler-rt-codesign.patch b/pkgs/development/compilers/llvm/rocm/compiler-rt/compiler-rt-codesign.patch deleted file mode 100644 index 3cc12b94b200..000000000000 --- a/pkgs/development/compilers/llvm/rocm/compiler-rt/compiler-rt-codesign.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 3dec5f3475a26aeb4678627795c4b67c6b7b4785 Mon Sep 17 00:00:00 2001 -From: Will Dietz -Date: Tue, 19 Sep 2017 13:13:06 -0500 -Subject: [PATCH] remove codesign use on Apple, disable ios sim testing that - needs it - ---- - cmake/Modules/AddCompilerRT.cmake | 8 ------ - test/asan/CMakeLists.txt | 52 --------------------------------------- - test/tsan/CMakeLists.txt | 47 ----------------------------------- - 3 files changed, 107 deletions(-) - -diff --git a/cmake/Modules/AddCompilerRT.cmake b/cmake/Modules/AddCompilerRT.cmake -index bc5fb9ff7..b64eb4246 100644 ---- a/cmake/Modules/AddCompilerRT.cmake -+++ b/cmake/Modules/AddCompilerRT.cmake -@@ -210,14 +210,6 @@ function(add_compiler_rt_runtime name type) - set_target_properties(${libname} PROPERTIES IMPORT_PREFIX "") - set_target_properties(${libname} PROPERTIES IMPORT_SUFFIX ".lib") - endif() -- if(APPLE) -- # Ad-hoc sign the dylibs -- add_custom_command(TARGET ${libname} -- POST_BUILD -- COMMAND codesign --sign - $ -- WORKING_DIRECTORY ${COMPILER_RT_LIBRARY_OUTPUT_DIR} -- ) -- endif() - endif() - install(TARGETS ${libname} - ARCHIVE DESTINATION ${COMPILER_RT_LIBRARY_INSTALL_DIR} -2.14.1 - diff --git a/pkgs/development/compilers/llvm/rocm/compiler-rt/default.nix b/pkgs/development/compilers/llvm/rocm/compiler-rt/default.nix index 575082905fed..dfc21e7fe013 100644 --- a/pkgs/development/compilers/llvm/rocm/compiler-rt/default.nix +++ b/pkgs/development/compilers/llvm/rocm/compiler-rt/default.nix @@ -29,12 +29,9 @@ stdenv.mkDerivation rec { outputs = [ "out" "dev" ]; - patches = [ - ./compiler-rt-codesign.patch # Revert compiler-rt commit that makes codesign mandatory - # https://github.com/llvm/llvm-project/commit/68d5235cb58f988c71b403334cd9482d663841ab.diff but the compiler-rt part of the path is stripped - ./68d5235cb58f988c71b403334cd9482d663841ab.patch - ]; - + prePatch = '' + cd compiler-rt + ''; # 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 diff --git a/pkgs/development/compilers/llvm/rocm/default.nix b/pkgs/development/compilers/llvm/rocm/default.nix index b1297d7d0d1f..18fd44612f10 100644 --- a/pkgs/development/compilers/llvm/rocm/default.nix +++ b/pkgs/development/compilers/llvm/rocm/default.nix @@ -1,12 +1,12 @@ { stdenv, lib, buildPackages, fetchFromGitHub, callPackage, wrapCCWith, overrideCC }: let - version = "4.5.2"; + version = "5.0.2"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "llvm-project"; rev = "rocm-${version}"; - hash = "sha256-XWh81+2yyXQEPO+5SgxHh66fzFG1bVbvnjPfvXDC+fU="; + hash = "sha256-wPzwbeQUFE6RAytrz5lBa6UUPoVL0UeMyY3qa4M6W6M="; }; in rec { clang = wrapCCWith rec { @@ -47,7 +47,7 @@ in rec { compiler-rt = callPackage ./compiler-rt { inherit version llvm; - src = "${src}/compiler-rt"; + inherit src; stdenv = overrideCC stdenv clangNoCompilerRt; }; diff --git a/pkgs/development/compilers/llvm/rocm/llvm/default.nix b/pkgs/development/compilers/llvm/rocm/llvm/default.nix index 003fb4998c36..722ca1a762a8 100644 --- a/pkgs/development/compilers/llvm/rocm/llvm/default.nix +++ b/pkgs/development/compilers/llvm/rocm/llvm/default.nix @@ -59,7 +59,9 @@ in stdenv.mkDerivation rec { "-DSPHINX_WARNINGS_AS_ERRORS=OFF" ]; - postPatch = lib.optional enableSharedLibraries '' + postPatch = '' + patchShebangs lib/OffloadArch/make_generated_offload_arch_h.sh + '' + lib.optionalString enableSharedLibraries '' substitute '${./outputs.patch}' ./outputs.patch --subst-var lib patch -p1 < ./outputs.patch ''; diff --git a/pkgs/development/libraries/rocm-comgr/default.nix b/pkgs/development/libraries/rocm-comgr/default.nix index 73075c9669a5..141c1b01d6f6 100644 --- a/pkgs/development/libraries/rocm-comgr/default.nix +++ b/pkgs/development/libraries/rocm-comgr/default.nix @@ -2,13 +2,13 @@ stdenv.mkDerivation rec { pname = "rocm-comgr"; - version = "4.5.2"; + version = "5.0.2"; src = fetchFromGitHub { owner = "RadeonOpenCompute"; repo = "ROCm-CompilerSupport"; rev = "rocm-${version}"; - hash = "sha256-enGzu1EOo87/S5oH1eEqPy0AtsBhCcroG3DYemeNgR0="; + hash = "sha256-EIBH7TXelo6mr+/vJ+iT+VLUVoQqWmNsgeN3Nwwr+tM="; }; sourceRoot = "source/lib/comgr";