Date: Tue, 24 Mar 2020 23:25:54 +0000 (UTC) From: Mitchell Horne <mhorne@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r359289 - head Message-ID: <202003242325.02ONPsHR090530@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mhorne Date: Tue Mar 24 23:25:54 2020 New Revision: 359289 URL: https://svnweb.freebsd.org/changeset/base/359289 Log: Makefile.inc1: override MACHINE for native-xtools For the final step of the native-xtools target, "everything" is built with TARGET and TARGET_ARCH set to the architecture we wish to cross-build for. However, CROSSENV overwrites the values of MACHINE and MACHINE_ARCH, setting them to be identical to TARGET and TARGET_ARCH. For native-xtools this is undesirable since we are building binaries to run on the host architecture, that can cross compile for the target architecture. When building native-xtools for RISC-V, this issue manifests as an invalid argument for "-march". The compiler is invoked with the target triple of the host architecture, but the CFLAGS inherited from bsd.cpu.mk are that of the target architecture. Reviewed by: imp, bdrewery MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D23838 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Mar 24 23:04:07 2020 (r359288) +++ head/Makefile.inc1 Tue Mar 24 23:25:54 2020 (r359289) @@ -2650,6 +2650,7 @@ NXBMAKE+= XCC="${NXBOBJTOP}/tmp/usr/bin/cc" \ XCPP="${NXBOBJTOP}/tmp/usr/bin/cpp" .endif NXBMAKE+= ${NXBMAKEENV} ${MAKE} -f Makefile.inc1 ${NXBMAKEARGS} \ + MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH} \ TARGET=${NXB_TARGET} TARGET_ARCH=${NXB_TARGET_ARCH} \ TARGET_TRIPLE=${MACHINE_TRIPLE:Q} # NXBDIRS is improperly based on MACHINE rather than NXB_TARGET. Need to
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003242325.02ONPsHR090530>