From 22cbbf9db223ab5b7d62b4b4e0a4b8e901c91c77 Mon Sep 17 00:00:00 2001 From: Sean Bruno Date: Wed, 23 Jul 2014 22:18:43 +0000 Subject: [PATCH] Deprecate the use of XDEV and XDEV_ARCH and just use TARGET/TARGET_ARCH for the xdev build target, which is awesome and totally works. Reapply svn R268377 with correct name of libsupc++ here as this does resolve one dependancy race when building the xdev target. the xdev target builds for amd64, i386, mips, mips64 and armv6 with this commit, must be built as root, must be built from /usr/src, must not have a /usr/obj and places the xdev tools in /usr/$TARGET_ARCH-freebsd the xdev target still leaves some assorted files strewn about your /usr/src when this is done and needs to be investigated further. Phabric: https://phabric.freebsd.org/D385 Submitted by: bsdimp --- Makefile.inc1 | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index d6dc6fcb603c..62ed26a2e840 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1366,9 +1366,6 @@ kernel-tools: .MAKE # # cross-tools: Build cross-building tools # -.if !defined(TARGET_ARCH) && defined(XDEV_ARCH) -TARGET_ARCH= ${XDEV_ARCH} -.endif .if ${TARGET_ARCH} != ${MACHINE_ARCH} .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld @@ -1497,6 +1494,7 @@ _prebuild_libs= ${_kerberos5_lib_libasn1} \ .if ${MK_GNUCXX} != "no" _prebuild_libs+= gnu/lib/libstdc++ gnu/lib/libsupc++ gnu/lib/libstdc++__L: lib/msun__L +gnu/lib/libsupc++__L: gnu/lib/libstdc++__L .endif .if defined(WITH_ATF) || ${MK_TESTS} != "no" @@ -1853,9 +1851,9 @@ builddtb: ############### -.if defined(XDEV) && defined(XDEV_ARCH) +.if defined(TARGET) && defined(TARGET_ARCH) -.if ${XDEV} == ${MACHINE} && ${XDEV_ARCH} == ${MACHINE_ARCH} +.if ${TARGET} == ${MACHINE} && ${TARGET_ARCH} == ${MACHINE_ARCH} XDEV_CPUTYPE?=${CPUTYPE} .else XDEV_CPUTYPE?=${TARGET_CPUTYPE} @@ -1864,10 +1862,10 @@ XDEV_CPUTYPE?=${TARGET_CPUTYPE} NOFUN=-DNO_FSCHG MK_HTML=no MK_INFO=no -DNO_LINT \ MK_MAN=no MK_NLS=no MK_PROFILE=no \ MK_KERBEROS=no MK_RESCUE=no MK_TESTS=no MK_WARNS=no \ - TARGET=${XDEV} TARGET_ARCH=${XDEV_ARCH} \ + TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ CPUTYPE=${XDEV_CPUTYPE} -XDDIR=${XDEV_ARCH}-freebsd +XDDIR=${TARGET_ARCH}-freebsd XDTP?=/usr/${XDDIR} .if ${XDTP:N/*} .error XDTP variable should be an absolute path @@ -1883,7 +1881,7 @@ CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \ -B${XDDESTDIR}/usr/bin -B${XDDESTDIR}/usr/lib CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" CXX="${CXX} ${CD2CFLAGS}" \ CPP="${CPP} ${CD2CFLAGS}" \ - MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH} + MACHINE=${TARGET} MACHINE_ARCH=${TARGET_ARCH} CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN} @@ -1982,5 +1980,5 @@ xdev-links: done .else xdev xdev-build xdev-install xdev-links: - @echo "*** Error: Both XDEV and XDEV_ARCH must be defined for \"${.TARGET}\" target" + @echo "*** Error: Both TARGET and TARGET_ARCH must be defined for \"${.TARGET}\" target" .endif