icecc / icecream

Distributed compiler with a central scheduler to share build load
GNU General Public License v2.0
1.6k stars 252 forks source link

Update icecc-create-env to support glibc-hwcaps #602

Closed thiagomacieira closed 2 years ago

thiagomacieira commented 2 years ago

Now in use in Clear Linux. For example:

$ ldd /bin/clang
        linux-vdso.so.1 (0x00007ffce4aa9000)
        libclang-cpp.so.14 => /bin/../lib64/libclang-cpp.so.14 (0x00007f8459df9000)
        libLLVM.so.14 => /bin/../lib64/libLLVM.so.14 (0x00007f8453be0000)
        libstdc++.so.6 => /bin/../lib64/libstdc++.so.6 (0x00007f8453988000)
        libc.so.6 => /bin/../lib64/haswell/libc.so.6 (0x00007f8453759000)
        libm.so.6 => /bin/../lib64/../lib64/haswell/avx512_1/libm.so.6 (0x00007f8453671000)
        /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f845d253000)
        libffi.so.7 => /bin/../lib64/../lib64/libffi.so.7 (0x00007f8453662000)
        libedit.so.0 => /bin/../lib64/../lib64/libedit.so.0 (0x00007f845361f000)
        libz.so.1 => /bin/../lib64/../lib64/libz.so.1 (0x00007f84535f8000)
        libtinfo.so.6 => /bin/../lib64/../lib64/libtinfo.so.6 (0x00007f84535c4000)
        libxml2.so.2 => /bin/../lib64/../lib64/libxml2.so.2 (0x00007f8453414000)
        libgcc_s.so.1 => /bin/../lib64/../lib64/glibc-hwcaps/x86-64-v3/libgcc_s.so.1 (0x00007f84533f3000)
        liblzma.so.5 => /bin/../lib64/../lib64/liblzma.so.5 (0x00007f84533c5000)

Without this patch, we get in the compiler package:

$ tar -tf /var/cache/icecream/native/d42be071c8d51f1b74d5c7d9b563c714.tar.gz | grep libgcc_s
usr/lib64/glibc-hwcaps/x86-64-v3/libgcc_s.so.1

With it, we get both the optimised and base lib:

$ tar -tf c81cea00f3ab11f349a8b8caa6e1eb37.tar.gz | grep libgcc_s
usr/lib64/glibc-hwcaps/x86-64-v3/libgcc_s.so.1
usr/lib64/libgcc_s.so.1

I don't have any x86-64-v4 libs to test with right now.

llunak commented 2 years ago

Thank you.