summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorart <art@openbsd.org>2001-08-31 10:54:59 +0000
committerart <art@openbsd.org>2001-08-31 10:54:59 +0000
commit5ed3a518f14a0363ec7da6a62ef3c464576f20a9 (patch)
tree86332023a50d884c4bc0ed9e7b390d512f77a51d
parentI should get more sleep. (diff)
downloadwireguard-openbsd-5ed3a518f14a0363ec7da6a62ef3c464576f20a9.tar.xz
wireguard-openbsd-5ed3a518f14a0363ec7da6a62ef3c464576f20a9.zip
Magic to make sparc64 cross-tools not bomb in the first 5 minutes
of building cross-tools.
-rw-r--r--Makefile12
1 files changed, 9 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 9024d9836ce..e91d3cb670b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.69 2001/06/26 18:00:16 brad Exp $
+# $OpenBSD: Makefile,v 1.70 2001/08/31 10:54:59 art Exp $
#
# For more information on building in tricky environments, please see
@@ -114,11 +114,16 @@ CROSSENV= AR=${CROSSDIR}/usr/bin/ar AS=${CROSSDIR}/usr/bin/as \
HOSTCC=cc
CROSSPATH= ${PATH}:${CROSSDIR}/usr/bin
+.if (${TARGET} == "sparc64")
+CROSSENV+= CPPFLAGS=-D__arch64__
+CPPFLAGS=-D__arch64__
+.endif
+
cross-helpers:
@-mkdir -p ${CROSSDIR}
echo _MACHINE_ARCH | \
cat ${.CURDIR}/sys/arch/${TARGET}/include/param.h - | \
- ${CPP} -E -I${.CURDIR}/sys/arch | \
+ ${CPP} ${CPPFLAGS} -E -I${.CURDIR}/sys/arch | \
sed -n '$$p' >${CROSSDIR}/TARGET_ARCH
eval `grep '^osr=' sys/conf/newvers.sh`; \
sed "s/\$$/-unknown-openbsd$$osr/" ${CROSSDIR}/TARGET_ARCH > \
@@ -154,7 +159,8 @@ cross-includes: cross-dirs
${MAKE} DESTDIR=${CROSSDIR} includes
.if ${TARGET} == "powerpc" || ${TARGET} == "alpha" || ${TARGET} == "arc" || \
- ${TARGET} == "pmax" || ${TARGET} == "wgrisc" || ${TARGET} == "hppa"
+ ${TARGET} == "pmax" || ${TARGET} == "wgrisc" || ${TARGET} == "hppa" || \
+ ${TARGET} == "sparc64"
cross-binutils: cross-binutils-new
.else
cross-binutils: cross-binutils-old