commit:     12344ff2860eca5dffa212e1b95aac414f1992dc
Author:     Yiyang Wu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Tue Jun 21 10:51:05 2022 +0000
Commit:     Benda XU <heroxbd <AT> gentoo <DOT> org>
CommitDate: Wed Jun 22 12:59:29 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=12344ff2

dev-util/hip: Fix -isystem pollution after d5835abb

After d5835abbe66be09b9851fcc79a158d1a083ad8fc which corrects the
HIP_PATH, HIP_INCLUDE_PATH now points to /usr/include and hipcc.pl added
-isystem $HIP_INCLUDE_PATH which caused complilation failure. Fix it by
removing lines in hipcc.pl

Bug: https://bugs.gentoo.org/853184
Reference: https://github.com/justxi/rocm/issues/8#issuecomment-1159800433
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Benda Xu <heroxbd <AT> gentoo.org>

 dev-util/hip/{hip-5.0.2-r1.ebuild => hip-5.0.2-r2.ebuild} | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dev-util/hip/hip-5.0.2-r1.ebuild b/dev-util/hip/hip-5.0.2-r2.ebuild
similarity index 98%
rename from dev-util/hip/hip-5.0.2-r1.ebuild
rename to dev-util/hip/hip-5.0.2-r2.ebuild
index 771cda985e88..037c442ec73b 100644
--- a/dev-util/hip/hip-5.0.2-r1.ebuild
+++ b/dev-util/hip/hip-5.0.2-r2.ebuild
@@ -67,6 +67,7 @@ src_prepare() {
        # Setting HSA_PATH to "/usr" results in setting "-isystem /usr/include"
        # which makes "stdlib.h" not found when using "#include_next" in header 
files;
        sed -e "/FLAGS .= \" -isystem \$HSA_PATH/d" \
+               -e "/HIP.*FLAGS.*isystem.*HIP_INCLUDE_PATH/d" \
                -e "s:\$ENV{'DEVICE_LIB_PATH'}:'/usr/lib/amdgcn/bitcode':" \
                -e "/rpath/s,--rpath=[^ ]*,," \
                -i bin/hipcc.pl || die

Reply via email to