[libc] Find linux kernel headers in Debian multiarch directories (#224314)

On Debian/Ubuntu systems without gcc-multilib, architecture-specific
kernel headers are installed in /usr/include/<triple>/asm, while generic
headers are in /usr/include/linux. Because the symlink /usr/include/asm
does not exist, full host builds failed to find <asm/errno.h> and other
asm headers.

Instead of requiring root access to create a symlink in /usr, check if
/usr/include/<triple>/asm exists (using LIBC_TARGET_TRIPLE or
CMAKE_LIBRARY_ARCHITECTURE) and prepend it to LIBC_KERNEL_HEADERS.

Also update consumers of LIBC_KERNEL_HEADERS in runtimes and libc++ test
configs so they handle semicolon-separated lists properly.

Assisted-by: Gemini
GitOrigin-RevId: 0afe0094aa8c4310a21722f0ff21a7c8502896e8
1 file changed