TL;DR most everything build fine
I found the following links useful as starters.
https://wiki.gentoo.org/wiki/Clang
https://blogs.gentoo.org/gsoc2016-nativ ... -in-gentoo
I also quickly realized that a lot of information available is outdated & not completely accurate given how quickly this stack has developed.
This is a multilib unstable install using profile 17.1. The primary modifications to make.conf were
Code: Select all
CC="clang"
CXX="clang++"
AR="llvm-ar"
NM="llvm-nm"
RANLIB="llvm-ranlib"
After testing a couple individual packages I went ahead & proceeded with
Code: Select all
emerge -e @system
Unresolved
app-emulation/qemu
* `qxl.c:(.text+0x200): undefined reference to __atomic_fetch_or_4`
dev-lang/spidermonkey
* not sure
media-libs/mesa
* `disk_cache.c:(.text+0xf67): undefined reference to __atomic_fetch_add_8`
Resolved
dev-libs/libgcrypt
* `/var/tmp/portage/dev-libs/libgcrypt-1.8.2-r2/work/libgcrypt-1.8.2/random/jitterentropy-base.c:53:13: warning: unknown pragma ignored [-Wunknown-pragmas]`
* `#pragma GCC optimize ("O0")`
* FIXED: USE="o-flag-munging"
dev-libs/nss
* g++: error: unrecognized command line option ‘-Qunused-arguments’; did you mean ‘-Wunused-parameter’?
* FIXED: https://bugs.gentoo.org/651044
sys-cluster/ceph
* /usr/lib/llvm/6/bin/llvm-ar: Unknown command: open.
* FIXED: use gnu ar
sys-devel/gcc
* `/var/tmp/portage/sys-devel/gcc-7.3.0/work/gcc-7.3.0/gcc/hash-table.h:834:1: internal compiler error: Illegal instruction`
* hash_table<Descriptor, Allocator>
* FIXED: use compiler-rt
sys-devel/m4
* https://bugs.llvm.org/show_bug.cgi?id=16404
* FIXED: use compiler-rt
x11-libs/pixman
* `/var/tmp/portage/x11-libs/pixman-0.34.0/work/pixman-0.34.0/test/utils-prng.c:207:27: error: use of unknown builtin '__builtin_shuffle' [-Wimplicit-function-declaration]`
* FIXED: issue w/ patch https://bugs.freedesktop.org/show_bug.cgi?id=104886
Not Possible
glibc
* `checking if clang -m32 -Wl,-O1 -Wl,--as-needed is sufficient to build libc... no`
* /var/tmp/portage/sys-libs/glibc-2.27-r1/work/build-x86-x86_64-pc-linux-gnu-nptl/config.log
* BROKEN: https://sourceware.org/glibc/wiki/GlibcMeetsClang
And the kernel?
Code: Select all
dmesg | head -1
[ 0.000000] Linux version 4.15.9-gentoo (root@monkey) (clang version 6.0.0 (tags/RELEASE_600/final)) #3 SMP PREEMPT Mon Mar 19 21:39:33 KST 2018
Hope this is useful to anyone who wants to give this a go. Should also note build times are similar and everything runs about as fast as it used though I've not really done any testing. I use this machine daily & haven't noticed any crashes.


