summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilfried Holzke <gentoo@holzke.net>2021-06-20 11:31:33 +0200
committerCraig Andrews <candrews@gentoo.org>2021-06-27 09:48:07 -0400
commit93c7f2be86a2bd3884fd9036aba872404cc7009e (patch)
tree48dbe3391fe114eef0890a8ce5f1ce4cff844761 /sys-devel
parentbase/package.use.mask: mask lto for dev-lang/gnat-gpl (diff)
downloadgentoo-93c7f2be86a2bd3884fd9036aba872404cc7009e.tar.gz
gentoo-93c7f2be86a2bd3884fd9036aba872404cc7009e.tar.bz2
gentoo-93c7f2be86a2bd3884fd9036aba872404cc7009e.zip
sys-devel/llvm-roc: Version bump to 4.2.0 and QA
Signed-off-by: Wilfried Holzke <gentoo@holzke.net> Package-Manager: Portage-3.0.18, Repoman-3.0.2 Closes: https://github.com/gentoo/gentoo/pull/21342 Signed-off-by: Craig Andrews <candrews@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/llvm-roc/Manifest1
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch11
-rw-r--r--sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch28
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild2
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild2
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild2
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild2
-rw-r--r--sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild92
8 files changed, 136 insertions, 4 deletions
diff --git a/sys-devel/llvm-roc/Manifest b/sys-devel/llvm-roc/Manifest
index 98d12741dbb..34ffa4e3f6b 100644
--- a/sys-devel/llvm-roc/Manifest
+++ b/sys-devel/llvm-roc/Manifest
@@ -6,3 +6,4 @@ DIST llvm-rocm-ocl-4.0.0.tar.gz 123595983 BLAKE2B 69dd47a50a53cf7d8168f872778bcd
DIST llvm-rocm-ocl-4.0.1.tar.gz 123608276 BLAKE2B dd5a4d6bc198c7fb6fdc2514cd8c4533a2df6ded7a574c9b4762cda3cb65498a464a0e78427db94db05b468a29ce78d3d8131ac7c6e42953fc503896732474e3 SHA512 d23dceaee2badf46cda27aa725bce5b82bab2fba7d1c2220fedb4795eee455de5077b4ff7299ecd6850eeb0bbdb131ea12a699357f373aef818758d845550f04
DIST llvm-rocm-ocl-4.1.0.tar.gz 128913932 BLAKE2B 15a041ec7b9fec91e409c8ab98ff88f2d15ce58822aa8a77a26ff21416378a4a77a5904fce4e26c5447653da4ec2dbbb5bfec4ae70c72e8e64b2a5f5986ffb92 SHA512 8576e5a43754a9587613f166dc6cad18890812f07bfa55e563ab3de150b6f01ae1b5515aaaf4eef238a7f79e87890533ce791ef07528e4557ea8290c2642ebd3
DIST llvm-rocm-ocl-4.1.1.tar.gz 128914019 BLAKE2B 9806d1da497e9d9864fd015fc92f5e2d8a6077315d96538064357a38347bc9180948c65cdca9e29574b40f8df62c0660762731564822ac9e8b5364bebf016e43 SHA512 0e4c6b9b0c0330d58616f22d8ec6ebdd6c83aef9ce9968765ac56c022bcd76cba8af5a6cdfb47ed560b33cd67832ac5b026502357af6caec4ab699f1443163fd
+DIST llvm-rocm-ocl-4.2.0.tar.gz 132337711 BLAKE2B f08781f881f2853cd551828ef9190c1253e33ca1bfb13aac790b6484838fe5481be9519609ea9cf4bc09a6c8631c54a567123dfe97c25498c51c464d215049de SHA512 694c37c707c84d18cddb92054d8d59e1eea82c9c9928d0111992cbae1421d6bb614a0889891993b444a821c35fa6e91c801ac8555761c2cd0803f89981475952
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch
new file mode 100644
index 00000000000..da21ab2fc85
--- /dev/null
+++ b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-add_Object.patch
@@ -0,0 +1,11 @@
+diff --color -uprN orig/lib/Target/AMDGPU/Disassembler/CMakeLists.txt llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt
+--- orig/lib/Target/AMDGPU/Disassembler/CMakeLists.txt 2021-06-14 11:57:54.222796911 +0800
++++ llvm/lib/Target/AMDGPU/Disassembler/CMakeLists.txt 2021-06-14 11:58:35.206796875 +0800
+@@ -11,6 +11,7 @@ add_llvm_component_library(LLVMAMDGPUDis
+ MC
+ MCDisassembler
+ Support
++ Object
+
+ ADD_TO_COMPONENT
+ AMDGPU
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch
new file mode 100644
index 00000000000..0f3398951b0
--- /dev/null
+++ b/sys-devel/llvm-roc/files/llvm-roc-4.2.0-current_pos.patch
@@ -0,0 +1,28 @@
+diff -Naur a/include/llvm/Support/raw_ostream.h b/include/llvm/Support/raw_ostream.h
+--- a/include/llvm/Support/raw_ostream.h 2021-05-22 19:56:44.779955686 +0200
++++ b/include/llvm/Support/raw_ostream.h 2021-05-22 20:00:49.449954752 +0200
+@@ -610,9 +610,7 @@
+ /// See raw_ostream::write_impl.
+ void write_impl(const char *Ptr, size_t Size) override;
+
+- /// Return the current position within the stream, not counting the bytes
+- /// currently in the buffer.
+- uint64_t current_pos() const override { return OS.size(); }
++ uint64_t current_pos() const override;
+
+ public:
+ explicit raw_string_ostream(std::string &O) : OS(O) {
+diff -Naur a/lib/Support/raw_ostream.cpp b/lib/Support/raw_ostream.cpp
+--- a/lib/Support/raw_ostream.cpp 2021-05-22 19:59:05.651955148 +0200
++++ b/lib/Support/raw_ostream.cpp 2021-05-22 20:01:22.929954625 +0200
+@@ -938,6 +938,10 @@
+ // raw_string_ostream
+ //===----------------------------------------------------------------------===//
+
++/// Return the current position within the stream, not counting the bytes
++/// currently in the buffer.
++uint64_t raw_string_ostream::current_pos() const { return OS.size(); }
++
+ raw_string_ostream::~raw_string_ostream() {
+ flush();
+ }
diff --git a/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild
index 9e962ecd02d..1c7a0fec017 100644
--- a/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild
+++ b/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild
@@ -39,7 +39,7 @@ src_prepare() {
pushd "${S}"/../clang >/dev/null || die
sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
eend $?
- ebegin "Use ${EPREFIX} as default sysroot"
+ ebegin "Use "${EPREFIX}" as default sysroot"
cd lib/Driver/ToolChains >/dev/null || die
ebegin "Use dynamic linker from ${EPREFIX}"
sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
diff --git a/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild
index ac8ba78ad58..3967ddabbea 100644
--- a/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild
+++ b/sys-devel/llvm-roc/llvm-roc-4.0.0.ebuild
@@ -38,7 +38,7 @@ src_prepare() {
sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
eend $?
- ebegin "Use ${EPREFIX} as default sysroot"
+ ebegin "Use "${EPREFIX}" as default sysroot"
cd lib/Driver/ToolChains >/dev/null || die
ebegin "Use dynamic linker from ${EPREFIX}"
sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
diff --git a/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild
index 9e962ecd02d..1c7a0fec017 100644
--- a/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild
+++ b/sys-devel/llvm-roc/llvm-roc-4.0.1.ebuild
@@ -39,7 +39,7 @@ src_prepare() {
pushd "${S}"/../clang >/dev/null || die
sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
eend $?
- ebegin "Use ${EPREFIX} as default sysroot"
+ ebegin "Use "${EPREFIX}" as default sysroot"
cd lib/Driver/ToolChains >/dev/null || die
ebegin "Use dynamic linker from ${EPREFIX}"
sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
diff --git a/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild
index e571fd4ca56..68df2726a37 100644
--- a/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild
+++ b/sys-devel/llvm-roc/llvm-roc-4.1.0.ebuild
@@ -39,7 +39,7 @@ src_prepare() {
pushd "${S}"/../clang >/dev/null || die
sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
eend $?
- ebegin "Use ${EPREFIX} as default sysroot"
+ ebegin "Use "${EPREFIX}" as default sysroot"
cd lib/Driver/ToolChains >/dev/null || die
ebegin "Use dynamic linker from ${EPREFIX}"
sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
diff --git a/sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild b/sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild
new file mode 100644
index 00000000000..7a2834b7dd3
--- /dev/null
+++ b/sys-devel/llvm-roc/llvm-roc-4.2.0.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake
+
+DESCRIPTION="Radeon Open Compute llvm,lld,clang"
+HOMEPAGE="https://github.com/RadeonOpenCompute/ROCm/"
+SRC_URI="https://github.com/RadeonOpenCompute/llvm-project/archive/rocm-${PV}.tar.gz -> llvm-rocm-ocl-${PV}.tar.gz"
+
+LICENSE="UoI-NCSA rc BSD public-domain"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="debug +runtime"
+
+RDEPEND="virtual/cblas
+ dev-libs/libxml2
+ sys-libs/zlib
+ sys-libs/ncurses:="
+DEPEND="${RDEPEND}"
+
+S="${WORKDIR}/llvm-project-rocm-${PV}/llvm"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-4.2.0-current_pos.patch"
+ "${FILESDIR}/${PN}-4.2.0-add_BinaryFormat.patch"
+)
+
+CMAKE_BUILD_TYPE=RelWithDebInfo
+
+src_prepare() {
+ cd "${WORKDIR}/llvm-project-rocm-${PV}" || die
+ eapply "${FILESDIR}/${PN}-3.0.0-add_libraries.patch"
+ eapply "${FILESDIR}/${PN}-4.0.0-remove-isystem-usr-include.patch"
+
+ if [[ -n ${EPREFIX} ]]; then
+ pushd "${S}"/../clang >/dev/null || die
+ sed -i -e "s@DEFAULT_SYSROOT \"\"@DEFAULT_SYSROOT \"${EPREFIX}\"@" CMakeLists.txt
+ eend $?
+ ebegin "Use "${EPREFIX}" as default sysroot"
+ cd lib/Driver/ToolChains >/dev/null || die
+ ebegin "Use dynamic linker from ${EPREFIX}"
+ sed -i -e "/LibDir.*Loader/s@return \"\/\"@return \"${EPREFIX}/\"@" Linux.cpp
+ eend $?
+
+ ebegin "Remove --sysroot call on ld for native toolchain"
+ sed -i -e "$(grep -n -B1 sysroot= Gnu.cpp | sed -ne '{1s/-.*//;1p}'),+1 d" Gnu.cpp
+ eend $?
+ popd >/dev/null || die
+ fi
+
+ # handled by sysroot, don't prefixify here.
+ sed -e 's:/opt/rocm:/usr/lib/hip:' \
+ -i "${S}"/../clang/lib/Driver/ToolChains/AMDGPU.cpp
+
+ eapply_user
+ cmake_src_prepare
+}
+
+src_configure() {
+ PROJECTS="clang;lld"
+
+ if usex runtime; then
+ PROJECTS+=";compiler-rt"
+ fi
+
+ local mycmakeargs=(
+ -DCMAKE_INSTALL_PREFIX="${EPREFIX}/usr/lib/llvm/roc"
+ -DLLVM_ENABLE_PROJECTS="${PROJECTS}"
+ -DLLVM_TARGETS_TO_BUILD="AMDGPU;X86"
+ -DLLVM_BUILD_DOCS=NO
+ -DLLVM_ENABLE_OCAMLDOC=OFF
+ -DLLVM_ENABLE_SPHINX=NO
+ -DLLVM_ENABLE_DOXYGEN=OFF
+ -DLLVM_INSTALL_UTILS=ON
+ -DLLVM_VERSION_SUFFIX=roc
+ -DOCAMLFIND=NO
+ )
+
+ use debug || local -x CPPFLAGS="${CPPFLAGS} -DNDEBUG"
+
+ cmake_src_configure
+}
+
+src_install() {
+ cmake_src_install
+ cat > "99${PN}" <<-EOF
+ LDPATH="${EROOT}/usr/lib/llvm/roc/lib"
+ EOF
+ doenvd "99${PN}"
+}