From owner-svn-src-head@freebsd.org Sat May 28 16:21:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A6C80B4E20D; Sat, 28 May 2016 16:21:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 5890D1DD0; Sat, 28 May 2016 16:21:06 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4SGL5qZ081402; Sat, 28 May 2016 16:21:05 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4SGL5Bd081401; Sat, 28 May 2016 16:21:05 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201605281621.u4SGL5Bd081401@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Sat, 28 May 2016 16:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300904 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 May 2016 16:21:06 -0000 Author: bdrewery Date: Sat May 28 16:21:05 2016 New Revision: 300904 URL: https://svnweb.freebsd.org/changeset/base/300904 Log: Always export X_* vars. This fixes CROSS_TOOLCHAIN builds after r300886 since it relies on X_COMPILER_TYPE being set. The X_* vars will only represent the external compiler being used. Sponsored by: EMC / Isilon Storage Division Modified: head/share/mk/bsd.compiler.mk Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Sat May 28 16:06:07 2016 (r300903) +++ head/share/mk/bsd.compiler.mk Sat May 28 16:21:05 2016 (r300904) @@ -108,8 +108,10 @@ ccache-print-options: .PHONY # CC and COMPILER_* settings here. _exported_vars= ${X_}COMPILER_TYPE ${X_}COMPILER_VERSION \ ${X_}COMPILER_FREEBSD_VERSION -${X_}_cc_hash= ${${cc}}${MACHINE}${PATH} -${X_}_cc_hash:= ${${X_}_cc_hash:hash} +# Handle importing cached vars, but not for X_ vars. +.if ${X_} == "" +_cc_hash= ${${cc}}${MACHINE}${PATH} +_cc_hash:= ${_cc_hash:hash} # Only import if none of the vars are set somehow else. _can_export= yes .for var in ${_exported_vars} @@ -119,11 +121,12 @@ _can_export= no .endfor .if ${_can_export} == yes .for var in ${_exported_vars} -.if defined(${var}.${${X_}_cc_hash}) -${var}= ${${var}.${${X_}_cc_hash}} +.if defined(${var}.${_cc_hash}) +${var}= ${${var}.${_cc_hash}} .endif .endfor .endif +.endif # ${X_} == "" .if ${cc} == "CC" || (${cc} == "XCC" && ${XCC} != ${CC}) .if ${MACHINE} == "common" @@ -183,9 +186,14 @@ X_COMPILER_FEATURES= ${COMPILER_FEATURES # Export the values so sub-makes don't have to look them up again, using the # hash key computed above. .for var in ${_exported_vars} -${var}.${${X_}_cc_hash}:= ${${var}} -.export-env ${var}.${${X_}_cc_hash} -.undef ${var}.${${X_}_cc_hash} +.if ${X_} == "" +${var}.${_cc_hash}:= ${${var}} +.export-env ${var}.${_cc_hash} +.undef ${var}.${_cc_hash} +.else +# Always export X_ vars. +.export-env ${var} +.endif .endfor .endif # ${cc} == "CC" || !empty(XCC)