Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F169307070
D3898.id9402.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D3898.id9402.diff
View Options
Index: share/mk/bsd.compiler.mk
===================================================================
--- share/mk/bsd.compiler.mk
+++ share/mk/bsd.compiler.mk
@@ -25,6 +25,17 @@
.if !target(__<bsd.compiler.mk>__)
__<bsd.compiler.mk>__:
+# Try to import COMPILER_TYPE and COMPILER_VERSION from parent make.
+# The value is only used/exported for the same CC/MACHINE to ensure no
+# accidental cached values if CC/MACHINE change.
+_cc_hash= ${CC}${MACHINE}
+_cc_hash:= ${_cc_hash:hash}
+.for var in COMPILER_TYPE COMPILER_VERSION
+.if defined(${var}.${_cc_hash})
+${var}= ${${var}.${_cc_hash}}
+.endif
+.endfor
+
.if ${MACHINE} == "common"
# common is a pseudo machine for architecture independent
# generated files - thus there is no compiler.
@@ -54,6 +65,14 @@
.undef _v
.endif
+# Export the values so sub-makes don't have to look them up again. Use
+# a hash based on CC+MACHINE in case CC changes in the sub-make.
+.for var in COMPILER_TYPE COMPILER_VERSION
+${var}.${_cc_hash}:= ${${var}}
+.export-env ${var}.${_cc_hash}
+.undef ${var}.${_cc_hash}
+.endfor
+
.if ${COMPILER_TYPE} == "clang" || \
(${COMPILER_TYPE} == "gcc" && ${COMPILER_VERSION} >= 40800)
COMPILER_FEATURES= c++11
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Sep 2, 4:15 AM (21 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37902160
Default Alt Text
D3898.id9402.diff (1 KB)
Attached To
Mode
D3898: Pass bsd.compiler.mk execution findings to sub-makes.
Attached
Detach File
Event Timeline
Log In to Comment