From ec133b1fb77486c0e569579810fb54be6dba95af Mon Sep 17 00:00:00 2001 From: Trung Nguyen <57174311+trungnt2910@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:42:49 +0700 Subject: [PATCH] clang12: Add missing GNU headers include path (#9217) * clang12: Add missing GNU headers include path Should fix #9198. * llvm12, revbump for python changes --------- Co-authored-by: Begasus --- sys-devel/llvm/llvm12-12.0.1.recipe | 23 +++++++++--------- sys-devel/llvm/patches/clang-12.0.1.patchset | 25 ++++++++++++++++++++ 2 files changed, 37 insertions(+), 11 deletions(-) diff --git a/sys-devel/llvm/llvm12-12.0.1.recipe b/sys-devel/llvm/llvm12-12.0.1.recipe index c83611f5d..1e02f8854 100644 --- a/sys-devel/llvm/llvm12-12.0.1.recipe +++ b/sys-devel/llvm/llvm12-12.0.1.recipe @@ -31,7 +31,7 @@ other than the ones listed above. HOMEPAGE="https://www.llvm.org/" COPYRIGHT="2003-2019 University of Illinois at Urbana-Champaign" LICENSE="Apache v2 with LLVM Exception" -REVISION="7" +REVISION="8" SOURCE_URI="https://github.com/llvm/llvm-project/releases/download/llvmorg-$portVersion/llvm-$portVersion.src.tar.xz" CHECKSUM_SHA256="7d9a8405f557cefc5a21bf5672af73903b64749d9bc3a50322239f56f34ffddf" SOURCE_DIR="llvm-$portVersion.src" @@ -456,7 +456,7 @@ PROVIDES_clang_analysis=" " REQUIRES_clang_analysis=" llvm12${secondaryArchSuffix}_clang == $portVersion base - cmd:python + cmd:python3 " CONFLICTS_clang_analysis=" llvm${secondaryArchSuffix}_clang_analysis @@ -503,13 +503,14 @@ REQUIRES_libs=" lib:libz$secondaryArchSuffix " -PYTHON3_VERSION="3.9" -PROVIDES_python3=" - llvm12${secondaryArchSuffix}_python3 = $portVersion +PYTHON_PACKAGES="python310" +PYTHON3_VERSION="3.10" +PROVIDES_python310=" + llvm12${secondaryArchSuffix}_$PYTHON_PACKAGES = $portVersion cmd:lit " -REQUIRES_python3=" - setuptools_python${PYTHON3_VERSION//.} +REQUIRES_python310=" + setuptools_$PYTHON_PACKAGES cmd:python$PYTHON3_VERSION " @@ -557,7 +558,7 @@ REQUIRES_libunwind_devel=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libz$secondaryArchSuffix - setuptools_python39 + setuptools_$PYTHON_PACKAGES " BUILD_PREREQUIRES=" cmd:cmake @@ -633,7 +634,7 @@ INSTALL() ninja install # GENERIC: all python_setuptools-based installs need this - local pythonPackageName="${portName}_python3-$portFullVersion" + local pythonPackageName="${portName}_python310-$portFullVersion" local packageLinksDir=$(dirname $portPackageLinksDir) python=$packageLinksDir/${pythonPackageName}/cmd~python$PYTHON3_VERSION/bin/python$PYTHON3_VERSION pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3) @@ -806,8 +807,8 @@ INSTALL() $libDir/libLTO* \ $libDir/libRemarks* - # python3 package - packageEntries python3 \ + # python310 package + packageEntries python310 \ $binDir/lit \ $prefix/lib/python* diff --git a/sys-devel/llvm/patches/clang-12.0.1.patchset b/sys-devel/llvm/patches/clang-12.0.1.patchset index 2934398d6..2f0cff71b 100644 --- a/sys-devel/llvm/patches/clang-12.0.1.patchset +++ b/sys-devel/llvm/patches/clang-12.0.1.patchset @@ -194,3 +194,28 @@ index 50a20c2..ac65381 100644 -- 2.37.3 + +From 089a07be1f393fc06a8b67f015e40a718ba550dc Mon Sep 17 00:00:00 2001 +From: Trung Nguyen <57174311+trungnt2910@users.noreply.github.com> +Date: Mon, 14 Aug 2023 14:58:56 +1000 +Subject: [PATCH] Haiku: Add missing GNU headers include path + +--- + lib/Frontend/InitHeaderSearch.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/Frontend/InitHeaderSearch.cpp b/lib/Frontend/InitHeaderSearch.cpp +index b8ecee03..2d999898 100644 +--- a/lib/Frontend/InitHeaderSearch.cpp ++++ b/lib/Frontend/InitHeaderSearch.cpp +@@ -331,6 +331,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple, + AddPath("/boot/system/develop/headers/3rdparty", System, false); + AddPath("/boot/system/develop/headers/bsd", System, false); + AddPath("/boot/system/develop/headers/glibc", System, false); ++ AddPath("/boot/system/develop/headers/gnu", System, false); + AddPath("/boot/system/develop/headers/posix", System, false); + #ifdef HAIKU_HYBRID_SECONDARY + AddPath("/boot/system/develop/headers/" HAIKU_HYBRID_SECONDARY, System, false); +-- +2.39.2 +