Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#78161 - [musl] musl-clang wrapper chokes on <immintrin.h>
Attached to Project:
Community Packages
Opened by Darjan Krijan (daren) - Monday, 10 April 2023, 14:01 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 10 May 2023, 22:54 GMT
Opened by Darjan Krijan (daren) - Monday, 10 April 2023, 14:01 GMT
Last edited by Toolybird (Toolybird) - Wednesday, 10 May 2023, 22:54 GMT
|
DetailsDescription:
The musl-clang wrapper breaks when a C file includes <immintrin.h>. This is due to the wrapper disabling system and compiler include paths entirely with '-nolibinc'. Additional info: * musl 1.2.3-1 Steps to reproduce: - Install 'musl' and 'clang' packages and try: $ echo -e "#include <immintrin.h>\nint main(){return 0;}" | clang -x c - ^ works $ echo -e "#include <immintrin.h>\nint main(){return 0;}" | musl-clang -x c - ^ breaks Steps to fix: Replace '-nolibinc' with '-nostdlibinc' (description in clang manpage) in wrapper so system include directories like '/usr/include' are still not searched, but compiler ones like '/usr/lib/clang/$clang_ver/include' that contain immintrin.h, etc. are. Add just "make DESTDIR="$pkgdir" install": sed -e "s/-nostdinc/-nostdlibinc/g" -i "${pkgdir}/usr/bin/musl-clang" I am not sure if this could break something else, but in my opinion compiler include directories should be essential for the compiler to work properly. |
This task depends upon
https://www.openwall.com/lists/musl/2023/04/11/4