Date: Thu, 28 Feb 2013 16:44:42 GMT From: Brooks Davis <brooks@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 222461 for review Message-ID: <201302281644.r1SGigmW077258@skunkworks.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/@@222461?ac=10 Change 222461 by brooks@brooks_zenith on 2013/02/28 16:44:30 To allow xdev-build trees to be used change CROSS_*_PATH to CROSS_*_PREFIX and prepend it to X* tools without a / between them. Don't add -B${CROSS_BINUTILS_PATH} to the compiler if it doesn't exist in the filesystem. Suggested by: imp Affected files ... .. //depot/projects/ctsrd/tesla/src/Makefile.inc1#9 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/Makefile.inc1#9 (text+ko) ==== @@ -281,22 +281,22 @@ WMAKEENV+= NO_CTF=1 .endif -.if defined(CROSS_TOOLCHAIN_PATH) -CROSS_COMPILER_PATH?=${CROSS_TOOLCHAIN_PATH} -CROSS_BINUTILS_PATH?=${CROSS_TOOLCHAIN_PATH} +.if defined(CROSS_TOOLCHAIN_PREFIX) +CROSS_COMPILER_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} +CROSS_BINUTILS_PREFIX?=${CROSS_TOOLCHAIN_PREFIX} .endif XCOMPILERS= CC CXX CPP .for COMPILER in ${XCOMPILERS} -.if defined(CROSS_COMPILER_PATH) -X${COMPILER}?= ${CROSS_COMPILER_PATH}/${${COMPILER}} +.if defined(CROSS_COMPILER_PREFIX) +X${COMPILER}?= ${CROSS_COMPILER_PREFIX}${${COMPILER}} .else X${COMPILER}?= ${${COMPILER}} .endif .endfor XBINUTILS= AS AR LD NM OBJDUMP RANLIB STRINGS .for BINUTIL in ${XBINUTILS} -.if defined(CROSS_BINUTILS_PATH) -X${BINUTIL}?= ${CROSS_BINUTILS_PATH}/${${BINUTIL}} +.if defined(CROSS_BINUTILS_PREFIX) +X${BINUTIL}?= ${CROSS_BINUTILS_PREFIX}${${BINUTIL}} .else X${BINUTIL}?= ${${BINUTIL}} .endif @@ -304,7 +304,7 @@ WMAKEENV+= CC="${XCC} ${XFLAGS}" CXX="${XCXX} ${XFLAGS}" \ CPP="${XCPP} ${XFLAGS}" \ AS="${XAS}" AR="${XAR}" LD="${XLD}" NM=${XNM} \ - OBJDUMP=${XOBJDUMP} RANLIB=${RANLIB} STRINGS=${XSTRINGS} + OBJDUMP=${XOBJDUMP} RANLIB=${XRANLIB} STRINGS=${XSTRINGS} .if ${XCC:T:Mgcc} == "gcc" WMAKE_COMPILER_TYPE= gcc @@ -318,8 +318,13 @@ .if ${XCC:M/*} XFLAGS= --sysroot=${WORLDTMP} -.if defined(CROSS_BINUTILS_PATH) -XFLAGS+= -B${CROSS_BINUTILS_PATH} +.if defined(CROSS_BINUTILS_PREFIX) +# In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a +# directory, but the compiler will look in the right place for it's +# tools so we don't need to tell it where to look. +.if exists(${CROSS_BINUTILS_PREFIX}) +XFLAGS+= -B${CROSS_BINUTILS_PREFIX} +.endif .else XFLAGS+= -B${WORLDTMP}/usr/bin .endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302281644.r1SGigmW077258>