Changeset View
Changeset View
Standalone View
Standalone View
share/mk/bsd.compiler.mk
Show All 19 Lines | |||||
# compiler support for that feature: | # compiler support for that feature: | ||||
# | # | ||||
# - c++17: supports full (or nearly full) C++17 programming environment. | # - c++17: supports full (or nearly full) C++17 programming environment. | ||||
# - c++14: supports full (or nearly full) C++14 programming environment. | # - c++14: supports full (or nearly full) C++14 programming environment. | ||||
# - c++11: supports full (or nearly full) C++11 programming environment. | # - c++11: supports full (or nearly full) C++11 programming environment. | ||||
# - retpoline: supports the retpoline speculative execution vulnerability | # - retpoline: supports the retpoline speculative execution vulnerability | ||||
# mitigation. | # mitigation. | ||||
# - init-all: supports stack variable initialization. | # - init-all: supports stack variable initialization. | ||||
# - aarch64-sha512: supports the AArch64 sha512 intrinsic functions. | |||||
# | # | ||||
# When bootstrapping on macOS, 'apple-clang' will be set in COMPILER_FEATURES | # When bootstrapping on macOS, 'apple-clang' will be set in COMPILER_FEATURES | ||||
# to differentiate Apple's version of Clang. Apple Clang uses a different | # to differentiate Apple's version of Clang. Apple Clang uses a different | ||||
# versioning scheme and may not support the same -W/-Wno warning flags. For a | # versioning scheme and may not support the same -W/-Wno warning flags. For a | ||||
# mapping of Apple Clang versions to upstream clang versions see | # mapping of Apple Clang versions to upstream clang versions see | ||||
# https://en.wikipedia.org/wiki/Xcode#Xcode_7.0_-_12.x_(since_Free_On-Device_Development) | # https://en.wikipedia.org/wiki/Xcode#Xcode_7.0_-_12.x_(since_Free_On-Device_Development) | ||||
# | # | ||||
# These variables with an X_ prefix will also be provided if XCC is set. | # These variables with an X_ prefix will also be provided if XCC is set. | ||||
▲ Show 20 Lines • Show All 212 Lines • ▼ Show 20 Lines | |||||
.if (${.MAKE.OS} == "FreeBSD" || defined(TARGET_ENDIANNESS)) && \ | .if (${.MAKE.OS} == "FreeBSD" || defined(TARGET_ENDIANNESS)) && \ | ||||
${TARGET_ENDIANNESS} == "1234" | ${TARGET_ENDIANNESS} == "1234" | ||||
${X_}COMPILER_FEATURES+= compressed-debug | ${X_}COMPILER_FEATURES+= compressed-debug | ||||
.endif | .endif | ||||
.endif | .endif | ||||
.if ${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 100000 || \ | .if ${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 100000 || \ | ||||
(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 80100) | (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 80100) | ||||
${X_}COMPILER_FEATURES+= fileprefixmap | ${X_}COMPILER_FEATURES+= fileprefixmap | ||||
.endif | |||||
.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 130000) || \ | |||||
emaste: If this is the case `retpoline` should be here too, but instead I think we could just drop this… | |||||
(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 90000) | |||||
# AArch64 sha512 intrinsics are supported (and have been tested) in | |||||
# clang 13 and gcc 9. | |||||
${X_}COMPILER_FEATURES+= aarch64-sha512 | |||||
.endif | .endif | ||||
.else | .else | ||||
# Use CC's values | # Use CC's values | ||||
X_COMPILER_TYPE= ${COMPILER_TYPE} | X_COMPILER_TYPE= ${COMPILER_TYPE} | ||||
X_COMPILER_VERSION= ${COMPILER_VERSION} | X_COMPILER_VERSION= ${COMPILER_VERSION} | ||||
X_COMPILER_FREEBSD_VERSION= ${COMPILER_FREEBSD_VERSION} | X_COMPILER_FREEBSD_VERSION= ${COMPILER_FREEBSD_VERSION} | ||||
X_COMPILER_FEATURES= ${COMPILER_FEATURES} | X_COMPILER_FEATURES= ${COMPILER_FEATURES} | ||||
Show All 19 Lines |
If this is the case retpoline should be here too, but instead I think we could just drop this comment, list aarch64-sha512 in the list at line 22, and add a MD annotation there.