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
This commit is contained in:
parent
2130a3dd61
commit
e032a84ef7
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user