@@ -, +, @@ Add an option for GNU as and enable only on GCC architectures amd64, i386, arm, and arm64 use Clang as the system compiler, and use the Clang driver and integrated assembler, so a standalone as is not required. --- b/gnu/usr.bin/binutils/Makefile +++ b/gnu/usr.bin/binutils/Makefile @@ -7,11 +7,15 @@ SUBDIR= doc\ libbfd \ libopcodes \ libbinutils \ - as \ + ${_as} \ ld \ ${_objcopy} \ objdump \ +.if ${MK_AS} != "no" +_as= as +.endif + .if ${MK_ELFCOPY_AS_OBJCOPY} == "no" _objcopy= objcopy .endif --- b/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -217,15 +217,15 @@ __TT=${MACHINE} ${__T} == "amd64" || ${__TT} == "arm" || ${__T} == "i386") # Clang is enabled, and will be installed as the default /usr/bin/cc. __DEFAULT_YES_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC -__DEFAULT_NO_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX +__DEFAULT_NO_OPTIONS+=AS GCC GCC_BOOTSTRAP GNUCXX .elif ${COMPILER_FEATURES:Mc++11} && ${__T:Mpowerpc*} # On powerpc, if an external compiler that supports C++11 is used as ${CC}, # then Clang is enabled, but GCC is installed as the default /usr/bin/cc. -__DEFAULT_YES_OPTIONS+=CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX +__DEFAULT_YES_OPTIONS+=AS CLANG CLANG_FULL GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG_BOOTSTRAP CLANG_IS_CC .else # Everything else disables Clang, and uses GCC instead. -__DEFAULT_YES_OPTIONS+=GCC GCC_BOOTSTRAP GNUCXX +__DEFAULT_YES_OPTIONS+=AS GCC GCC_BOOTSTRAP GNUCXX __DEFAULT_NO_OPTIONS+=CLANG CLANG_BOOTSTRAP CLANG_FULL CLANG_IS_CC .endif # In-tree binutils/gcc are older versions without modern architecture support. --- b/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -61,6 +61,11 @@ OLD_FILES+=usr/share/man/man8/amd64/apm.8.gz OLD_FILES+=usr/share/man/man8/amd64/apmconf.8.gz .endif +.if ${MK_AS} == no +OLD_FILES+=usr/bin/as +OLD_FILES+=usr/share/man/man1/as.1.gz +.endif + .if ${MK_AT} == no OLD_FILES+=etc/pam.d/atrun OLD_FILES+=usr/bin/at