aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2014-04-10 22:44:52 +0800
committerbapt <bapt@FreeBSD.org>2014-04-10 22:44:52 +0800
commitf231074006fd99dbf47e9b3f5b580a3eb67afb7e (patch)
tree97e7b0870ce045c5fba8fc51c357901eb4ebdf29 /Mk
parentb254ec5537595d917d4406bf9abd426fe91e17b0 (diff)
downloadfreebsd-ports-gnome-f231074006fd99dbf47e9b3f5b580a3eb67afb7e.tar.gz
freebsd-ports-gnome-f231074006fd99dbf47e9b3f5b580a3eb67afb7e.tar.zst
freebsd-ports-gnome-f231074006fd99dbf47e9b3f5b580a3eb67afb7e.zip
Allow regular make xdev to be used as a cross building env
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk8
1 files changed, 7 insertions, 1 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 2f666ebfd5da..2297ffcb41cb 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1155,12 +1155,18 @@ BUILD_DEPENDS= ${X_BUILD_FOR}-cc:${PORTSDIR}/devel/${X_BUILD_FOR}-xdev
HCC:= ${CC}
HCXX:= ${CXX}
.endif
+.if !exists(/usr/${X_BUILD_FOR}/usr/bin/cc)
CC= ${LOCALBASE}/${X_BUILD_FOR}/usr/bin/cc
CXX= ${LOCALBASE}/${X_BUILD_FOR}/usr/bin/c++
+PKG_ENV+= ABI_FILE=${LOCALBASE}/${X_BUILD_FOR}/usr/lib/crt1.o
+.else
+CC= /usr/${X_BUILD_FOR}/usr/bin/cc
+CXX= /usr/${X_BUILD_FOR}/usr/bin/c++
+PKG_ENV+= ABI_FILE=/usr/${X_BUILD_FOR}/usr/lib/crt1.o
+.endif
NM= ${X_BUILD_FOR}-nm
STRIP_CMD= ${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
# only bmake support the below
STRIPBIN= ${STRIP_CMD}
.export.env STRIPBIN