Page MenuHomeFreeBSD

native-xtools: GCC and CLANG are exclusive, pick one.
AbandonedPublic

Authored by sbruno on Nov 24 2017, 5:57 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 19 2024, 8:32 AM
Unknown Object (File)
Dec 22 2023, 10:09 PM
Unknown Object (File)
Dec 21 2023, 11:37 PM
Unknown Object (File)
Sep 30 2023, 7:43 PM
Unknown Object (File)
Sep 14 2023, 11:21 AM
Unknown Object (File)
Jul 16 2023, 6:36 AM
Unknown Object (File)
Jul 15 2023, 4:33 PM
Unknown Object (File)
Jun 26 2023, 12:23 PM
Subscribers
None

Details

Summary

With CLANG growing mips64 support recently, the native-xtools
target now grinds away building the toolchain but it never gets used. Don't
do that.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 13003
Build 13257: arc lint + arc unit

Event Timeline

I wonder if this shouldn't be conditional on which compiler is used as cc. That way if you do 'make native-stools WITH_CLANG_AS_CC=yes' you would get clang instead of gcc.

In D13230#275661, @jhb wrote:

I wonder if this shouldn't be conditional on which compiler is used as cc. That way if you do 'make native-stools WITH_CLANG_AS_CC=yes' you would get clang instead of gcc.

I like that idea. The toggle isn't whether or not CLANG is being used but if CLANG is the default system compiler on this ARCH.

Default:

sbruno@lab:~/bsd/fbsd_head % make showconfig TARGET=mips TARGET_ARCH=mips64 | grep GCC
MK_GCC           = yes
MK_GCC_BOOTSTRAP = yes
sbruno@lab:~/bsd/fbsd_head % make showconfig TARGET=mips TARGET_ARCH=mips64 | grep CLANG
MK_CLANG         = yes
MK_CLANG_BOOTSTRAP = no
MK_CLANG_EXTRAS  = no
MK_CLANG_FULL    = yes
MK_CLANG_IS_CC   = no

src.conf WITH_CLANG_IS_CC=y:

sbruno@lab:~/bsd/fbsd_head % make showconfig TARGET=mips TARGET_ARCH=mips64 | grep GCC
MK_GCC           = yes
MK_GCC_BOOTSTRAP = yes
sbruno@lab:~/bsd/fbsd_head % make showconfig TARGET=mips TARGET_ARCH=mips64 | grep CLANG
MK_CLANG         = yes
MK_CLANG_BOOTSTRAP = no
MK_CLANG_EXTRAS  = no
MK_CLANG_FULL    = yes
MK_CLANG_IS_CC   = yes

This code block also needs an adjustment to "something" as we have no need to add these to this target's build in the GCC case.

1901 # We need to build tblgen when we're building clang or lld, either as
1902 # bootstrap tools, or as the part of the normal build.
1903 .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" || \
1904     ${MK_LLD_BOOTSTRAP} != "no" || ${MK_LLD} != "no"
1905 _clang_tblgen= \
1906         lib/clang/libllvmminimal \
1907         usr.bin/clang/llvm-tblgen \
1908         usr.bin/clang/clang-tblgen
1909 
1910 ${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmminimal
1911 ${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-lib/clang/libllvmminimal
1912 .endif