aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-04-04 00:29:01 +0800
committerbapt <bapt@FreeBSD.org>2014-04-04 00:29:01 +0800
commit7b619339bfb816fb2f7e2d31535413e8f9ae6ab3 (patch)
tree15fd0390d854ec3dd98e5970ade6197e6dc6aaf1 /Mk
parentfbce0ce49992c67b4710275d2a7484cf023a994c (diff)
downloadfreebsd-ports-gnome-7b619339bfb816fb2f7e2d31535413e8f9ae6ab3.tar.gz
freebsd-ports-gnome-7b619339bfb816fb2f7e2d31535413e8f9ae6ab3.tar.zst
freebsd-ports-gnome-7b619339bfb816fb2f7e2d31535413e8f9ae6ab3.zip
Define HCC and HCXX (host cc and host cxx when cross building)
Simplify what need to be defined by directly using the cc in the sysroot instead of the one in LOCALBASE/bin which might call ${LOCALBASE}/bin/ld instead of the cross build ld (same for as) if binutils from ports is installed and a build system messes up with the CFLAGS
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk16
1 files changed, 7 insertions, 9 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index aeed0df47938..87fecab5e802 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1138,17 +1138,15 @@ IGNORE= Cross building is only compatible with stagified ports
.endif
BUILD_DEPENDS= ${X_BUILD_FOR}-cc:${PORTSDIR}/devel/${X_BUILD_FOR}-xdev
# Do not define CPP on purpose
-CC= ${X_BUILD_FOR}-cc
-CXX= ${X_BUILD_FOR}-c++
-LD= ${X_BUILD_FOR}-ld
-AS= ${X_BUILD_FOR}-as
+.if !defined(HCC)
+HCC:= ${CC}
+HCXX:= ${CXX}
+.endif
+CC= ${LOCALBASE}/${X_BUILD_FOR}/usr/bin/cc
+CXX= ${LOCALBASE}/${X_BUILD_FOR}/usr/bin/c++
NM= ${X_BUILD_FOR}-nm
STRIP_CMD= ${X_BUILD_FOR}-strip
-CFLAGS+= -B${LOCALBASE}/${X_BUILD_FOR}/usr/bin
-CXXFLAGS+= -B${LOCALBASE}/${X_BUILD_FOR}/usr/bin
-LDFLAGS+= -B${LOCALBASE}/${X_BUILD_FOR}/usr/bin
-CONFIGURE_ENV+= LD=${LD} AS=${AS} NM=${NM}
-MAKE_ENV+= LD=${LD} AS=${AS} NM=${NM} STRIPBIN=${X_BUILD_FOR}-strip
+MAKE_ENV+= NM=${NM} STRIPBIN=${X_BUILD_FOR}-strip
PKG_ENV+= ABI_FILE=${LOCALBASE}/${X_BUILD_FOR}/usr/lib/crt1.o
.endif