Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151184208
D28315.id82792.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
803 B
Referenced Files
None
Subscribers
None
D28315.id82792.diff
View Options
Index: share/mk/bsd.compiler.mk
===================================================================
--- share/mk/bsd.compiler.mk
+++ share/mk/bsd.compiler.mk
@@ -187,7 +187,16 @@
. elif ${_v:Mclang} || ${_v:M(clang-*.*.*)}
${X_}COMPILER_TYPE:= clang
. else
+# With GCC, cc --version prints "cc $VERSION ($PKGVERSION)", so if a
+# distribution overrides the default GCC PKGVERSION it is not identified.
+# However, its -v output always says "gcc version" in it, so fall back on that.
+_gcc_version!= ${${cc}:N${CCACHE_BIN}} -v 2>&1 | grep "gcc version"
+. if !empty(_gcc_version)
+${X_}COMPILER_TYPE:= gcc
+. else
.error Unable to determine compiler type for ${cc}=${${cc}}. Consider setting ${X_}COMPILER_TYPE.
+. endif
+.undef _gcc_version
. endif
.endif
.if !defined(${X_}COMPILER_VERSION)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Apr 7, 4:16 PM (9 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31041465
Default Alt Text
D28315.id82792.diff (803 B)
Attached To
Mode
D28315: bsd.compiler.mk: Detect distribution-provided GCC when executed as cc
Attached
Detach File
Event Timeline
Log In to Comment