Build of linux-api-headers with musl toolchain

The build took 00h 03m 44s and was NOT successful.

The program in this build is written in the following languages, according to sloccount:

SLOCLanguage
13,732,698 ansic
283,459 asm
33,797 makefile
23,883 perl
10,916 sh
7,572 python
6,569 cpp
4,357 yacc
2,340 lex
1,130 awk
231 pascal
218 lisp
14,107,170 total

The process tree of the build process is here.

Several sub-process invocations were improper; see the process tree for details. Summary:

List of Errors

Log

To avoid scrolling, you may jump to the last line of the invocation of makepkg that was used to build this package.

Removed vanilla repositories from pacman.conf and added:
# [tuscan]
# Server = file:///var/cache/pacman/pkg/

CMD: pacman -Syy --noconfirm
# :: Synchronizing package databases...
# downloading tuscan.db...

There were existing files in /sysroot, using those
# /sysroot/lib
# /sysroot/share
# /sysroot/bin
# /sysroot/include
# /sysroot/libexec

CMD: sudo -u tuscan PATH=/sysroot/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin CC=clang CXX=clang++ red makepkg --noextract --syncdeps --skipinteg --skippgpcheck --skipchecksums --noconfirm --nocolor --log --noprogressbar --nocheck
# ==> Making package: linux-api-headers 4.5.5-1 (Wed Apr 5 00:22:12 UTC 2017)
# ==> Checking runtime dependencies...
# ==> Checking buildtime dependencies...
# ==> WARNING: Using existing $srcdir/ tree
# ==> Starting build()...
# CHK include/generated/uapi/linux/version.h
# UPD include/generated/uapi/linux/version.h
# HOSTCC scripts/basic/fixdep
# clang-3.8: warning: optimization flag '-fno-delete-null-pointer-checks' is not supported
# WRAP arch/x86/include/generated/asm/clkdev.h
# WRAP arch/x86/include/generated/asm/cputime.h
# WRAP arch/x86/include/generated/asm/dma-contiguous.h
# WRAP arch/x86/include/generated/asm/early_ioremap.h
# WRAP arch/x86/include/generated/asm/mcs_spinlock.h
# WRAP arch/x86/include/generated/asm/mm-arch-hooks.h
# SYSTBL arch/x86/entry/syscalls/../../include/generated/asm/syscalls_32.h
# SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_32.h
# SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_64.h
# SYSHDR arch/x86/entry/syscalls/../../include/generated/uapi/asm/unistd_x32.h
# scripts/basic/fixdep: error while loading shared libraries: /usr/lib/libc.so: invalid ELF header
# make[1]: *** [scripts/Makefile.host:91: scripts/basic/fixdep] Error 127
# make: *** [Makefile:439: scripts_basic] Error 2
# make: *** Waiting for unfinished jobs....
# ==> ERROR: A failure occurred in build().
# Aborting...