From owner-svn-src-all@freebsd.org Fri Nov 15 16:43:37 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C10651AA996; Fri, 15 Nov 2019 16:43:37 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47F4154FPfz4L4R; Fri, 15 Nov 2019 16:43:37 +0000 (UTC) (envelope-from arichardson@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 714CD1BC33; Fri, 15 Nov 2019 16:43:37 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAFGhbri023974; Fri, 15 Nov 2019 16:43:37 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAFGhbiJ023972; Fri, 15 Nov 2019 16:43:37 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201911151643.xAFGhbiJ023972@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Fri, 15 Nov 2019 16:43:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354736 - head/share/mk X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/share/mk X-SVN-Commit-Revision: 354736 X-SVN-Commit-Repository: base 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.29 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: Fri, 15 Nov 2019 16:43:37 -0000 Author: arichardson Date: Fri Nov 15 16:43:36 2019 New Revision: 354736 URL: https://svnweb.freebsd.org/changeset/base/354736 Log: Use __ as the separator for the exported vars in bsd.compiler/linker.mk By using '__' instead of '.' as the separator we can also support systems that use dash as /bin/sh (it's the default shell on Ubuntu/Debian). Dash will unset any environment variables that use a non alphanumeric+undedscore character and therefore submakes will fail to import the COMPILER_* variables if we use '.' as the separator. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D22381 Modified: head/share/mk/bsd.compiler.mk head/share/mk/bsd.linker.mk Modified: head/share/mk/bsd.compiler.mk ============================================================================== --- head/share/mk/bsd.compiler.mk Fri Nov 15 16:40:55 2019 (r354735) +++ head/share/mk/bsd.compiler.mk Fri Nov 15 16:43:36 2019 (r354736) @@ -155,8 +155,8 @@ _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}__${${X_}_cc_hash}) +${var}= ${${var}__${${X_}_cc_hash}} .endif .endfor .endif @@ -229,9 +229,9 @@ 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} +${var}__${${X_}_cc_hash}:= ${${var}} +.export-env ${var}__${${X_}_cc_hash} +.undef ${var}__${${X_}_cc_hash} .endfor .endif # ${cc} == "CC" || !empty(XCC) Modified: head/share/mk/bsd.linker.mk ============================================================================== --- head/share/mk/bsd.linker.mk Fri Nov 15 16:40:55 2019 (r354735) +++ head/share/mk/bsd.linker.mk Fri Nov 15 16:43:36 2019 (r354736) @@ -50,8 +50,8 @@ _can_export= no .endfor .if ${_can_export} == yes .for var in ${_exported_vars} -.if defined(${var}.${${X_}_ld_hash}) -${var}= ${${var}.${${X_}_ld_hash}} +.if defined(${var}__${${X_}_ld_hash}) +${var}= ${${var}__${${X_}_ld_hash}} .endif .endfor .endif @@ -101,9 +101,9 @@ X_LINKER_FREEBSD_VERSION= ${LINKER_FREEBSD_VERSION} # 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_}_ld_hash}:= ${${var}} -.export-env ${var}.${${X_}_ld_hash} -.undef ${var}.${${X_}_ld_hash} +${var}__${${X_}_ld_hash}:= ${${var}} +.export-env ${var}__${${X_}_ld_hash} +.undef ${var}__${${X_}_ld_hash} .endfor .endif # ${ld} == "LD" || !empty(XLD)