summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Floyd <cognifloyd@gmail.com>2020-12-18 15:06:17 -0600
committerFabian Groffen <grobian@gentoo.org>2020-12-19 20:07:39 +0100
commit80f6d04c612d5bd82d6cb0aca530c6f68addf7b6 (patch)
treed815509d2bdbe9c80ab125add2c1a91c826f6a0c /sys-devel/binutils-apple
parentdev-vcs/git: Bump to version 2.30.0_rc1. Removed old (diff)
downloadgentoo-80f6d04c612d5bd82d6cb0aca530c6f68addf7b6.tar.gz
gentoo-80f6d04c612d5bd82d6cb0aca530c6f68addf7b6.tar.bz2
gentoo-80f6d04c612d5bd82d6cb0aca530c6f68addf7b6.zip
sys-devel/binutils-apple-11.3.1: fix compilation on newer macOS
In the version of private header (dyld_priv.h) copied from DYLD sources, It uses TARGET_OS_BRIDGE which is not defined in the latest MacOSX.sdk. We don't care about BridgeOS, so we just disable that. This only hits during stage3 and later once we've compiled our own clang so that clang starts injecting -Werror,-Wundef-prefix=TARGET_OS_ (Apple must have that disabled in their version of clang). Bug: https://bugs.gentoo.org/758167 Signed-off-by: Jacob Floyd <cognifloyd@gmail.com> Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Diffstat (limited to 'sys-devel/binutils-apple')
-rw-r--r--sys-devel/binutils-apple/binutils-apple-11.3.1.ebuild4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys-devel/binutils-apple/binutils-apple-11.3.1.ebuild b/sys-devel/binutils-apple/binutils-apple-11.3.1.ebuild
index 9263d8e00b0f..9c24505b5520 100644
--- a/sys-devel/binutils-apple/binutils-apple-11.3.1.ebuild
+++ b/sys-devel/binutils-apple/binutils-apple-11.3.1.ebuild
@@ -79,6 +79,10 @@ src_prepare() {
mkdir -p include/mach-o || die
# never present because it's private
cp ../../${DYLD}/include/mach-o/dyld_priv.h include/mach-o || die
+ # TARGET_OS_BRIDGE is undefined in TargetConditionals.h of newer MacOSX.sdk.
+ # We don't target BridgeOS. Disable it to avoid errors when clang adds:
+ # -Werror,-Wundef-prefix=TARGET_OS_
+ sed -i -e 's/#if TARGET_OS_BRIDGE/#if 0/' include/mach-o/dyld_priv.h
local VER_STR="\"@(#)PROGRAM:ld PROJECT:${LD64} (Gentoo ${PN}-${PVR})\\n\""
echo "char ldVersionString[] = ${VER_STR};" > version.cpp