Created attachment 318748 [details]
emerge fail log
=dev-libs/klibc-1.5.25 fails to build with clang-3.1-r4
Please retest on klibc-2.0.3, so we can stabilize the new series and drop the 1.5 series if all tests are good.
(In reply to Robin Johnson from comment #1)
> Please retest on klibc-2.0.3, so we can stabilize the new series and drop
> the 1.5 series if all tests are good.
Retested with clang-3.4.2 and klibc 2.0.3-r1. It now fails because of invalid arguments (fno-delete-null-pointer-checks and maccumulate-outgoing-args).
I tried to track these down in the sources, but couldn't find them.
Retested with klibc-2.0.4 and clang-3.7/3.8_rc1, still fails when compiling.
I bumped the kernel version used by the ebuild to 4.4.1, to no avail (except for the fact that the unknown compile flags are not hard errors anymore, but just soft warnings). Note that with the linux-3.12 headers the errors may be much harder to fix, and anyway klibc's usr/klibc/README.klibc mentions "Extract a recent Linux kernel into a directory".
Please see the attached patch for the ebuild updates and the compile log with the patched ebuild.
Note that I removed all the logic for calculating the kernel version and patches. I know fetching patches is the preferred way because it reuses the same kernel base tarball, on the other hand it's much harder to read and understand - feel free to ignore those changes and/or fix as needed the original ebuild.
Created attachment 424728 [details, diff]
Patch for klibc-2.0.4 to compile with 4.4.1 kernel sources.
Created attachment 424730 [details]
Emerge compile log with ebuild patches.
all build for me with clang 3.5.0.
(In reply to Austin English from comment #6)
> all build for me with clang 3.5.0.
Mistake on my end, forgot to put clang after package name in package.env.
1.5.25 still fails:
x86_64-pc-linux-gnu-clang-3.5.0: error: unknown argument: '-fno-delete-null-pointer-checks'
x86_64-pc-linux-gnu-clang-3.5.0: error: unknown argument: '-maccumulate-outgoing-args'
Currently blocked by:
in clang-3.8, and bug 410945 (linux kernel doesn't build with clang).
Reassigning to the maintainer.
still valid with 2.0.4-r3?
Many changes in clang since. Please reopen if you can still repro it with new versions of clang.