From owner-svn-src-all@FreeBSD.ORG Sat Apr 12 15:06:16 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E43E346; Sat, 12 Apr 2014 15:06:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A16D1096; Sat, 12 Apr 2014 15:06:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3CF6FLs093468; Sat, 12 Apr 2014 15:06:15 GMT (envelope-from bapt@svn.freebsd.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3CF6FQH093467; Sat, 12 Apr 2014 15:06:15 GMT (envelope-from bapt@svn.freebsd.org) Message-Id: <201404121506.s3CF6FQH093467@svn.freebsd.org> From: Baptiste Daroussin Date: Sat, 12 Apr 2014 15:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r264372 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 12 Apr 2014 15:06:16 -0000 Author: bapt Date: Sat Apr 12 15:06:15 2014 New Revision: 264372 URL: http://svnweb.freebsd.org/changeset/base/264372 Log: MFC: r263881, r263952, r263983, r264068, r264090, r264131 Some xdev fixes: - if TARGET_ARCH is not defined and XDEV_ARCH is defined then early define TARGET_ARCH to the valud of XDEV_ARCH: This allow the xdev-build target to be able to correctly chose the compiler it needs to build - Allow overwriting XDTP to allow a user to not chose where the xdev env will live in - Fix build for gcc only xdev (like ia64) by providing the proper -B to the toolchain and not relying on gcc being installed already in base - Fix TOOLS_PREFIX so the generated toolchain has the right default sysroot when installed intead of getting the DESTDIR one - Fix supporting DESTDIR - Also overwrite CXX (needed for cross building c++ libraries with clang) and CPP (needed to cross build some libraries when gcc is the target default compiler but gcc is not installed on the building host) - Prevent XDTP from being a relative path: XDTP is used as the default SYSROOT for clang and thus should be an absolute path. - Respect default CC Modified: stable/10/Makefile.inc1 Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sat Apr 12 14:18:48 2014 (r264371) +++ stable/10/Makefile.inc1 Sat Apr 12 15:06:15 2014 (r264372) @@ -975,6 +975,8 @@ INSTALLKERNEL= ${_kernel} .endif .endfor +buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE + # # buildkernel # @@ -1369,6 +1371,9 @@ build-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} || ${BOOTSTRAPPING} < 800035 .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "i386" _btxld= usr.sbin/btxld @@ -1875,15 +1880,21 @@ NOFUN=-DNO_FSCHG -DWITHOUT_HTML -DWITHOU CPUTYPE=${XDEV_CPUTYPE} XDDIR=${XDEV_ARCH}-freebsd -XDTP=usr/${XDDIR} +XDTP?=/usr/${XDDIR} +.if ${XDTP:N/*} +.error XDTP variable should be an absolute path +.endif + CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \ INSTALL="sh ${.CURDIR}/tools/install.sh" CDENV= ${CDBENV} \ _SHLIBDIRPREFIX=${XDDESTDIR} \ - TOOLS_PREFIX=${XDDESTDIR} + TOOLS_PREFIX=${XDTP} CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \ - -B${XDDESTDIR}/usr/lib -CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" \ + --sysroot=${XDDESTDIR}/ -B${XDDESTDIR}/usr/libexec \ + -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} CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp @@ -1922,11 +1933,11 @@ _xb-build-tools: _xb-cross-tools: .for _tool in \ - gnu/usr.bin/binutils \ - gnu/usr.bin/cc \ + ${_binutils} \ usr.bin/ar \ ${_clang_libs} \ - ${_clang} + ${_clang} \ + ${_cc} ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool} && \ ${CDMAKE} DIRPRFX=${_tool}/ obj && \ @@ -1950,10 +1961,11 @@ xdev-install: xdev-build _xi-mtree _xi-c _xi-cross-tools: @echo "_xi-cross-tools" .for _tool in \ - gnu/usr.bin/binutils \ - gnu/usr.bin/cc \ + ${_binutils} \ usr.bin/ar \ - ${_clang} + ${_clang_libs} \ + ${_clang} \ + ${_cc} ${_+_}@${ECHODIR} "===> xdev ${_tool} (install)"; \ cd ${.CURDIR}/${_tool}; \ ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR} @@ -1980,5 +1992,3 @@ _xi-links: xdev xdev-build xdev-install: @echo "*** Error: Both XDEV and XDEV_ARCH must be defined for \"${.TARGET}\" target" .endif - -buildkernel ${WMAKE_TGTS} ${.ALLTARGETS:M_*}: .MAKE