USE=cpphs is not compatible to profiling builds.
Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/761805
Package-Manager: Portage-3.0.12, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Gentoo Prefix does not follow standard Apple practice of using --sysroot
or --isysroot on everything because we have to account for two "root"s.
1) EPREFIX is "root"
2) EPREFIX/MacOSX.sdk is also sysroot as it provides system headers.
So, adjust sys-libs/compiler-rt-sanitizers to prevent them from adding
the sysroot flags on Darwin.
Also adjust some CMAKE args to ensure it is using EPREFIX/MacOSX.sdk
instead of looking things up with xcrun.
Bug: https://bugs.gentoo.org/758167
Signed-off-by: Jacob Floyd <cognifloyd@gmail.com>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Gentoo Prefix does not follow standard Apple practice of using --sysroot
or --isysroot on everything because we have to account for two "root"s.
1) EPREFIX is "root"
2) EPREFIX/MacOSX.sdk is also sysroot as it provides system headers.
So, adjust sys-libs/compiler-rt to prevent them from adding the sysroot
flags on Darwin.
Also adjust some CMAKE args to ensure it is using EPREFIX/MacOSX.sdk
instead of looking things up with xcrun.
Bug: https://bugs.gentoo.org/758167
Signed-off-by: Jacob Floyd <cognifloyd@gmail.com>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Adjust the clang internal header/framework search paths when building on
darwin prefix. We symlink the selected MacOSX.sdk to EPREFIX/MacOSX.sdk
during bootstrap, so that is the correct place to get system headers,
such as those for libc, or for system framework headers, that we do not
replace in prefix.
Bug: https://bugs.gentoo.org/758167
Signed-off-by: Jacob Floyd <cognifloyd@gmail.com>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
When bootstrapping prefix on darwin, libcxx must be installed before
llvm is built during stage2 (in EPREFIX/tmp) and during stage3 (in
EPREFIX). llvm_pkg_setup, however, identifies the *installed* llvm to
set environment variables with the correct path to llvm. Since llvm is
not installed, we have to skip that step. But during bootstrap, we don't
need those environment vars to be modified anyway because
bootstrap-prefix.sh already sets them with the paths to the correct llvm
(which is the host's llm during stage2 and the EPREFIX/tmp llvm during
stage3).
Once stage3 is complete, llvm is installed in EPREFIX, so the system
rebuild (with `emerge -e system`) will successfully use llvm_pkg_setup.
bootstrap-prefix.sh is no longer controlling the vars at that point, so
it is important to allow llvm_pkg_setup to correctly modify the vars.
Other required fixes include:
- eprefrixify some dylib paths in CMakeLists.txt (dylib is only used
on darwin, so this is not an issue when compiling on other platforms).
- ensure want_gcc_s is OFF even if use=-libunwind on darwin
- keyword with ~x64-macos
Bug: https://bugs.gentoo.org/758167
Signed-off-by: Jacob Floyd <cognifloyd@gmail.com>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
When bootstrapping prefix on darwin, libcxxabi must be installed before
llvm is built during stage2 (in EPREFIX/tmp) and during stage3 (in
EPREFIX). llvm_pkg_setup, however, identifies the *installed* llvm to
set environment variables with the correct path to llvm. Since llvm is
not installed, we have to skip that step. But during bootstrap, we don't
need those environment vars to be modified anyway because
bootstrap-prefix.sh already sets them with the paths to the correct llvm
(which is the host's llm during stage2 and the EPREFIX/tmp llvm during
stage3).
Once stage3 is complete, llvm is installed in EPREFIX, so the system
rebuild (with `emerge -e system`) will successfully use llvm_pkg_setup.
bootstrap-prefix.sh is no longer controlling the vars at that point, so
it is important to allow llvm_pkg_setup to correctly modify the vars.
This also keywords the ebuild with ~x64-macos.
Bug: https://bugs.gentoo.org/758167
Signed-off-by: Jacob Floyd <cognifloyd@gmail.com>
Signed-off-by: Fabian Groffen <grobian@gentoo.org>