diff options
author | Jacob Floyd <cognifloyd@gmail.com> | 2020-12-31 18:49:04 +0100 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2020-12-31 18:49:04 +0100 |
commit | f7735b2d87b2e510098235c1cadc00a62818ddf5 (patch) | |
tree | c97f1fc01716dcfdcfc1f6059115dd88c6db292d | |
parent | scripts/bootstrap-prefix: adjust LLVM hacks (diff) | |
download | prefix-f7735b2d87b2e510098235c1cadc00a62818ddf5.tar.gz prefix-f7735b2d87b2e510098235c1cadc00a62818ddf5.tar.bz2 prefix-f7735b2d87b2e510098235c1cadc00a62818ddf5.zip |
scripts/bootstrap-prefix: properly deal with libcxx with clang
- libunwind is not available yet, and has more deps than we care to deal
with, so just compile libcxx without libunwind in stage2 & stage3
- llvm and clang need to be built with the same libc++. If you don't
build with the same libc++ then you get weird errors where comparing
std::error_code's fails because llvm has one errc enum, and clang has
a different one.
Bug: https://bugs.gentoo.org/758167
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rwxr-xr-x | scripts/bootstrap-prefix.sh | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index fd8a343dae..8dae1b5944 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -234,10 +234,11 @@ configure_toolchain() { mycc=clang compiler_stage1+=" ${llvm_deps} + sys-libs/libcxxabi + sys-libs/libcxx sys-devel/llvm sys-devel/clang - sys-libs/libcxxabi - sys-libs/libcxx" + " CC=clang CXX=clang++ # avoid going through hoops and deps for @@ -262,10 +263,11 @@ configure_toolchain() { mycc=clang compiler_stage1+=" ${llvm_deps} + sys-libs/libcxxabi + sys-libs/libcxx sys-devel/llvm sys-devel/clang - sys-libs/libcxxabi - sys-libs/libcxx" + " ;; esac CC=clang @@ -289,10 +291,10 @@ configure_toolchain() { local cdep="3.5.9999" compiler_stage1+=" dev-libs/libffi - <sys-devel/llvm-${cdep} <sys-libs/libcxx-headers-${cdep} <sys-libs/libcxxabi-${cdep} <sys-libs/libcxx-${cdep} + <sys-devel/llvm-${cdep} <sys-devel/clang-${cdep}" fi @@ -541,6 +543,9 @@ bootstrap_setup() { # Use package.use to disable in the portage tree to be shared between # stage2 and stage3. The hack will be undone during tree sync in stage3. cat >> "${ROOT}"/etc/portage/make.profile/package.use <<-EOF + # disable bootstrapping libcxx* with libunwind + sys-libs/libcxxabi -libunwind + sys-libs/libcxx -libunwind # Most binary Linux distributions seem to fancy toolchains that # do not do c++ support (need to install a separate package). sys-libs/ncurses -cxx |