diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.1.patch')
-rw-r--r-- | var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.1.patch | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.1.patch b/var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.1.patch new file mode 100644 index 0000000000..e332f90ee4 --- /dev/null +++ b/var/spack/repos/builtin/packages/hip/0012-Improve-compilation-without-git-repo-and-remove-compiler-rt-linkage-for-host.5.2.1.patch @@ -0,0 +1,71 @@ +From 526da7995578ef12908a297ae6fef4db0488253e Mon Sep 17 00:00:00 2001 +From: sreenivasa murthy kolam <sreenivasamurthy.kolam@amd.com> +Date: Tue, 16 Aug 2022 04:09:46 +0000 +Subject: [PATCH] Improve compilation without git repo and remove compiler rt + linkage-for-host + +--- + bin/hipcc.pl | 3 ++- + hipamd/CMakeLists.txt | 11 ++++++++--- + hipamd/hip-config.cmake.in | 1 - + 3 files changed, 10 insertions(+), 5 deletions(-) + +diff --git a/bin/hipcc.pl b/bin/hipcc.pl +index 1ef3a90..995abe5 100755 +--- a/bin/hipcc.pl ++++ b/bin/hipcc.pl +@@ -605,7 +605,8 @@ if($HIP_PLATFORM eq "amd"){ + $targetsStr = $ENV{HCC_AMDGPU_TARGET}; + } elsif (not $isWindows) { + # Else try using rocm_agent_enumerator +- $ROCM_AGENT_ENUM = "${ROCM_PATH}/bin/rocm_agent_enumerator"; ++ $ROCMINFO_PATH = $ENV{'ROCMINFO_PATH'} // $ROCM_PATH; ++ $ROCM_AGENT_ENUM = "${ROCMINFO_PATH}/bin/rocm_agent_enumerator"; + $targetsStr = `${ROCM_AGENT_ENUM} -t GPU`; + $targetsStr =~ s/\n/,/g; + } +diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt +index f425504..831b192 100755 +--- a/hipamd/CMakeLists.txt ++++ b/hipamd/CMakeLists.txt +@@ -89,9 +89,14 @@ list(GET VERSION_LIST 1 HIP_VERSION_MINOR) + list(GET VERSION_LIST 2 HIP_VERSION_PATCH_GITHASH) + string(REPLACE "-" ";" VERSION_LIST ${HIP_VERSION_PATCH_GITHASH}) + list(GET VERSION_LIST 0 HIP_VERSION_PATCH) +-set(HIP_VERSION_GITDATE 0) ++if (IS_DIRECTORY "${PROJECT_SOURCE_DIR}/.git") ++ find_package(Git) ++endif() ++set(HIP_VERSION_GITDATE "0") ++set(HIP_VERSION_GITHASH "0") ++set(HIP_VERSION_BUILD_ID 0) ++set(HIP_VERSION_BUILD_NAME "") + +-find_package(Git) + + # FIXME: Two different version strings used. + # Below we use UNIX commands, not compatible with Windows. +@@ -183,7 +188,7 @@ set (HIP_LIB_VERSION_MINOR ${HIP_VERSION_MINOR}) + if (${ROCM_PATCH_VERSION} ) + set (HIP_LIB_VERSION_PATCH ${ROCM_PATCH_VERSION}) + else () +- set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}-${HIP_VERSION_GITHASH}) ++ set (HIP_LIB_VERSION_PATCH ${HIP_VERSION_PATCH}) + endif () + set (HIP_LIB_VERSION_STRING "${HIP_LIB_VERSION_MAJOR}.${HIP_LIB_VERSION_MINOR}.${HIP_LIB_VERSION_PATCH}") + if (DEFINED ENV{ROCM_RPATH}) +diff --git a/hipamd/hip-config.cmake.in b/hipamd/hip-config.cmake.in +index ba3e75c..02dd586 100755 +--- a/hipamd/hip-config.cmake.in ++++ b/hipamd/hip-config.cmake.in +@@ -290,7 +290,6 @@ if(HIP_COMPILER STREQUAL "clang") + if(CLANGRT_BUILTINS-NOTFOUND) + message(FATAL_ERROR "clangrt builtins lib not found") + else() +- set_property(TARGET hip::host APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}") + set_property(TARGET hip::device APPEND PROPERTY INTERFACE_LINK_LIBRARIES "${CLANGRT_BUILTINS}") + endif() + endif() +-- +2.18.4 + |