Changeset View
Standalone View
Mk/Uses/compiler.mk
Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | |||||||||
USE_GCC= yes | USE_GCC= yes | ||||||||
CHOSEN_COMPILER_TYPE= gcc | CHOSEN_COMPILER_TYPE= gcc | ||||||||
.elif ${COMPILER_TYPE} == clang && ${COMPILER_FEATURES:Mlibstdc++} | .elif ${COMPILER_TYPE} == clang && ${COMPILER_FEATURES:Mlibstdc++} | ||||||||
USE_GCC= yes | USE_GCC= yes | ||||||||
CHOSEN_COMPILER_TYPE= gcc | CHOSEN_COMPILER_TYPE= gcc | ||||||||
.endif | .endif | ||||||||
.endif | .endif | ||||||||
.if ${_COMPILER_ARGS:Mc++17-lang} | .if ${_COMPILER_ARGS:Mc++17-lang} && !${COMPILER_FEATURES:Mc++17} || \ | ||||||||
brooks: I'd usually put parenthesizes around the && blocks rather than trusting operator precedence. | |||||||||
jrmAuthorUnsubmitted Done Inline ActionsI just wanted to wait for the exp-run to finish before making any code changes. The exp-run does pass, but are you aware of an issue with operator precedence? Or, do you mean the ( ) improves readability? jrm: I just wanted to wait for the exp-run to finish before making any code changes. The exp-run… | |||||||||
brooksUnsubmitted Done Inline ActionsIMO ( ) improves readability. I'd rather not have to think about any but the most trivial precedence rules (obviously a subjective thing) when reading large conditionals. brooks: IMO `( )` improves readability. I'd rather not have to think about any but the most trivial… | |||||||||
.if !${COMPILER_FEATURES:Mc++17} | ${_COMPILER_ARGS:Mc++14-lang} && !${COMPILER_FEATURES:Mc++14} || \ | ||||||||
${_COMPILER_ARGS:Mc++11-lang} && !${COMPILER_FEATURES:Mc++11} || \ | |||||||||
${_COMPILER_ARGS:Mc++0x} && !${COMPILER_FEATURES:Mc++0x} || \ | |||||||||
${_COMPILER_ARGS:Mc11} && !${COMPILER_FEATURES:Mc11} | |||||||||
.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 | .if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 | ||||||||
brooksUnsubmitted Done Inline Actions
Does it make sense to remove this OBE case while you're here (or as a new review)? brooks: Does it make sense to remove this OBE case while you're here (or as a new review)? | |||||||||
jrmAuthorUnsubmitted Done Inline ActionsI lean towards a separate review with some reviewers who work on other architectures, because I don't have access to most of the tier 2+ architectures for testing. Or, are you confident that it's no longer necessary? jrm: I lean towards a separate review with some reviewers who work on other architectures, because I… | |||||||||
brooksUnsubmitted Done Inline ActionsSeparate review is fine and probably necessary. It's not the case that all Tier 2 arches use clang because sparc64 exists (I keep forgetting it's still around in stable). This should be changed so all supported arches in 13 default to clang, but that will probably require testing. brooks: Separate review is fine and probably necessary. It's not the case that all Tier 2 arches use… | |||||||||
USE_GCC= yes | USE_GCC= yes | ||||||||
CHOSEN_COMPILER_TYPE= gcc | CHOSEN_COMPILER_TYPE= gcc | ||||||||
.elif ${COMPILER_TYPE} == gcc | .elif ${COMPILER_TYPE} == gcc | ||||||||
.if ${ALT_COMPILER_TYPE} == clang | .if ${ALT_COMPILER_TYPE} == clang | ||||||||
CPP= clang-cpp | CPP= clang-cpp | ||||||||
CC= clang | CC= clang | ||||||||
CXX= clang++ | CXX= clang++ | ||||||||
CHOSEN_COMPILER_TYPE= clang | CHOSEN_COMPILER_TYPE= clang | ||||||||
.else | .else | ||||||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang60:devel/llvm60 | BUILD_DEPENDS+= ${LOCALBASE}/bin/clang10:devel/llvm10 | ||||||||
CPP= ${LOCALBASE}/bin/clang-cpp60 | CPP= ${LOCALBASE}/bin/clang-cpp10 | ||||||||
CC= ${LOCALBASE}/bin/clang60 | CC= ${LOCALBASE}/bin/clang10 | ||||||||
CXX= ${LOCALBASE}/bin/clang++60 | CXX= ${LOCALBASE}/bin/clang++10 | ||||||||
CHOSEN_COMPILER_TYPE= clang | CHOSEN_COMPILER_TYPE= clang | ||||||||
.endif | |||||||||
.endif | |||||||||
.endif | |||||||||
.endif | |||||||||
.if ${_COMPILER_ARGS:Mc++14-lang} | |||||||||
.if !${COMPILER_FEATURES:Mc++14} | |||||||||
.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 | |||||||||
USE_GCC= yes | |||||||||
CHOSEN_COMPILER_TYPE= gcc | |||||||||
.elif ${COMPILER_TYPE} == gcc | |||||||||
.if ${ALT_COMPILER_TYPE} == clang | |||||||||
CPP= clang-cpp | |||||||||
CC= clang | |||||||||
CXX= clang++ | |||||||||
CHOSEN_COMPILER_TYPE= clang | |||||||||
.else | |||||||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang60:devel/llvm60 | |||||||||
CPP= ${LOCALBASE}/bin/clang-cpp60 | |||||||||
CC= ${LOCALBASE}/bin/clang60 | |||||||||
CXX= ${LOCALBASE}/bin/clang++60 | |||||||||
CHOSEN_COMPILER_TYPE= clang | |||||||||
.endif | |||||||||
.endif | |||||||||
.endif | |||||||||
.endif | |||||||||
.if ${_COMPILER_ARGS:Mc++11-lang} | |||||||||
.if !${COMPILER_FEATURES:Mc++11} | |||||||||
.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 | |||||||||
USE_GCC= yes | |||||||||
CHOSEN_COMPILER_TYPE= gcc | |||||||||
.elif ${COMPILER_TYPE} == gcc | |||||||||
.if ${ALT_COMPILER_TYPE} == clang | |||||||||
CPP= clang-cpp | |||||||||
CC= clang | |||||||||
CXX= clang++ | |||||||||
CHOSEN_COMPILER_TYPE= clang | |||||||||
.else | |||||||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang60:devel/llvm60 | |||||||||
CPP= ${LOCALBASE}/bin/clang-cpp60 | |||||||||
CC= ${LOCALBASE}/bin/clang60 | |||||||||
CXX= ${LOCALBASE}/bin/clang++60 | |||||||||
CHOSEN_COMPILER_TYPE= clang | |||||||||
.endif | |||||||||
.endif | |||||||||
.endif | |||||||||
.endif | |||||||||
.if ${_COMPILER_ARGS:Mc++0x} | |||||||||
.if !${COMPILER_FEATURES:Mc++0x} | |||||||||
.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 | |||||||||
USE_GCC= yes | |||||||||
CHOSEN_COMPILER_TYPE= gcc | |||||||||
.elif ${COMPILER_TYPE} == gcc | |||||||||
.if ${ALT_COMPILER_TYPE} == clang | |||||||||
CPP= clang-cpp | |||||||||
CC= clang | |||||||||
CXX= clang++ | |||||||||
CHOSEN_COMPILER_TYPE= clang | |||||||||
.else | |||||||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang60:devel/llvm60 | |||||||||
CHOSEN_COMPILER_TYPE= clang | |||||||||
CPP= ${LOCALBASE}/bin/clang-cpp60 | |||||||||
CC= ${LOCALBASE}/bin/clang60 | |||||||||
CXX= ${LOCALBASE}/bin/clang++60 | |||||||||
.endif | |||||||||
.endif | |||||||||
.endif | |||||||||
.endif | |||||||||
.if ${_COMPILER_ARGS:Mc11} | |||||||||
.if !${COMPILER_FEATURES:Mc11} | |||||||||
.if (defined(FAVORITE_COMPILER) && ${FAVORITE_COMPILER} == gcc) || (${ARCH} != amd64 && ${ARCH} != i386) # clang not always supported on Tier-2 | |||||||||
USE_GCC= yes | |||||||||
CHOSEN_COMPILER_TYPE= gcc | |||||||||
.elif ${COMPILER_TYPE} == gcc | |||||||||
.if ${ALT_COMPILER_TYPE} == clang | |||||||||
CPP= clang-cpp | |||||||||
CC= clang | |||||||||
CXX= clang++ | |||||||||
CHOSEN_COMPILER_TYPE= clang | |||||||||
.else | |||||||||
BUILD_DEPENDS+= ${LOCALBASE}/bin/clang60:devel/llvm60 | |||||||||
CHOSEN_COMPILER_TYPE= clang | |||||||||
CPP= ${LOCALBASE}/bin/clang-cpp60 | |||||||||
CC= ${LOCALBASE}/bin/clang60 | |||||||||
CXX= ${LOCALBASE}/bin/clang++60 | |||||||||
.endif | |||||||||
.endif | .endif | ||||||||
.endif | .endif | ||||||||
.endif | .endif | ||||||||
.if ${_COMPILER_ARGS:Mgcc-c++11-lib} | .if ${_COMPILER_ARGS:Mgcc-c++11-lib} | ||||||||
USE_GCC= yes | USE_GCC= yes | ||||||||
CHOSEN_COMPILER_TYPE= gcc | CHOSEN_COMPILER_TYPE= gcc | ||||||||
.if ${COMPILER_FEATURES:Mlibc++} | .if ${COMPILER_FEATURES:Mlibc++} | ||||||||
Show All 10 Lines |
I'd usually put parenthesizes around the && blocks rather than trusting operator precedence.