Lines Matching +full:gcc +full:- +full:g

4 # COMPILER_TYPE is the major type of compiler. Currently gcc and clang support
5 # automatic detection. Other compiler types can be shoe-horned in, but require
7 # explicitly if, say, you install gcc as clang...
13 # against 30300 for gcc likely isn't what you wanted (since versions of gcc
21 # - c++17: supports full (or nearly full) C++17 programming environment.
22 # - c++14: supports full (or nearly full) C++14 programming environment.
23 # - c++11: supports full (or nearly full) C++11 programming environment.
24 # - retpoline: supports the retpoline speculative execution vulnerability
26 # - init-all: supports stack variable initialization.
27 # - zeroregs: supports zeroing used registers on return
28 # - aarch64-sha512: supports the AArch64 sha512 intrinsic functions.
30 # When bootstrapping on macOS, 'apple-clang' will be set in COMPILER_FEATURES
32 # versioning scheme and may not support the same -W/-Wno warning flags. For a
34 # https://en.wikipedia.org/wiki/Xcode#Xcode_7.0_-_12.x_(since_Free_On-Device_Development)
62 !make(test-system-*) && !make(print-dir) && !make(showconfig) && \
72 # Export to ensure sub-makes can filter it out for mkdep/linking and
94 # Ensure no bogus CCACHE_PATH leaks in which might avoid the in-tree compiler.
101 PATH:= ${PATH:C,:?${CCACHE_WRAPPER_PATH}(/world)?(:$)?,,g}
110 PATH:= ${PATH:C,:?${CCACHE_WRAPPER_PATH}(/world)?(:$)?,,g}
114 # GCC does not need the CCACHE_CPP2 hack enabled by default in devel/ccache.
116 # which fails with -Wparentheses-equality, -Wtautological-compare, and
117 # -Wself-assign on macro-expanded lines.
118 .if defined(COMPILER_TYPE) && ${COMPILER_TYPE} == "gcc"
124 CCACHE_DIR!= ${CCACHE_BIN} -p | awk '$$2 == "cache_dir" {print $$4}'
135 ccache-print-options: .PHONY
136 @${CCACHE_BIN} -p
145 # tree (e.g. during make includes, etc.).
179 # generated files - thus there is no compiler.
184 _v!= ${${cc}:N${CCACHE_BIN}} --version || echo 0.0.0
187 . if ${${cc}:T:M*gcc*}
188 ${X_}COMPILER_TYPE:= gcc
192 ${X_}COMPILER_TYPE:= gcc
193 . elif ${_v:M\(GCC\)} || ${_v:M*GNU}
194 ${X_}COMPILER_TYPE:= gcc
195 . elif ${_v:Mclang} || ${_v:M(clang-*.*.*)}
198 # With GCC, cc --version prints "cc $VERSION ($PKGVERSION)", so if a
199 # distribution overrides the default GCC PKGVERSION it is not identified.
200 # However, its -v output always says "gcc version" in it, so fall back on that.
201 _gcc_version!= ${${cc}:N${CCACHE_BIN}} -v 2>&1 | grep "gcc version"
203 ${X_}COMPILER_TYPE:= gcc
211 ${X_}COMPILER_VERSION!=echo "${_v:M[1-9]*.[0-9]*}" | awk -F. '{print $$1 * 10000 + $$2 * 100 + $$3;}'
215 ${X_}COMPILER_FEATURES= apple-clang
220 ${X_}COMPILER_FREEBSD_VERSION!= { echo "__FreeBSD_cc_version" | ${${cc}:N${CCACHE_BIN}} -E - 2>/dev/null || echo __FreeBSD_cc_version; } | sed -n '$$p'
222 # is a non-FreeBSD build that doesn't support it or some other error
230 ${X_}COMPILER_RESOURCE_DIR!= ${${cc}:N${CCACHE_BIN}} -print-resource-dir 2>/dev/null || echo unknown
235 (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 70000)
239 (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 100100)
243 (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 120000)
244 ${X_}COMPILER_FEATURES+= init-all
251 # When compiling bootstrap tools on non-FreeBSD, the various MACHINE variables
252 # for the host can be missing or not match FreeBSD's naming (e.g. Linux/amd64
259 ${X_}COMPILER_FEATURES+= compressed-debug
263 (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 80100)
268 (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 110000)
273 (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 90000)
275 # clang 13 and gcc 9.
276 ${X_}COMPILER_FEATURES+= aarch64-sha512
288 # Export the values so sub-makes don't have to look them up again, using the
292 .export-env ${var}__${${X_}_cc_hash}