Page MenuHomeFreeBSD

D28315.diff
No OneTemporary

D28315.diff

diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk
--- a/share/mk/bsd.compiler.mk
+++ b/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

Mime Type
text/plain
Expires
Sun, May 24, 10:19 AM (2 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33469957
Default Alt Text
D28315.diff (773 B)

Event Timeline