Commit beb1ecc2 authored by jan.koester's avatar jan.koester
Browse files

test

parent 5bd2eed3
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -140,13 +140,22 @@ setup_toolchain() {
        make install

        # Install Linux kernel headers into musl sysroot
        cd /tmp
        KERNEL_VERSION=\$(apt-cache show linux-headers-amd64 2>/dev/null | grep Depends | head -1 | grep -oP '[0-9]+\.[0-9]+' | head -1 || echo '6.1')
        apt-get install -y --no-install-recommends linux-libc-dev
        cp -a /usr/include/linux /usr/local/musl/include/
        cp -a /usr/include/asm-generic /usr/local/musl/include/
        cp -a /usr/include/x86_64-linux-gnu/asm /usr/local/musl/include/ 2>/dev/null || \
        # Debian stores arch-specific headers under multiarch path
        if [ -d /usr/include/x86_64-linux-gnu/asm ]; then
            cp -a /usr/include/x86_64-linux-gnu/asm /usr/local/musl/include/
        elif [ -d /usr/include/asm ]; then
            cp -a /usr/include/asm /usr/local/musl/include/
        else
            # Generate minimal asm headers from asm-generic
            mkdir -p /usr/local/musl/include/asm
            for f in /usr/local/musl/include/asm-generic/*.h; do
                name=\$(basename \$f)
                echo \"#include <asm-generic/\${name}>\" > /usr/local/musl/include/asm/\${name}
            done
        fi

        # Build libc++, libc++abi and libunwind against musl from LLVM source
        # LLVM 18 requires the unified runtimes build