Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 11 Apr 2023 19:04:26 +0200
From: Gabriel Ravier <gabravier@...il.com>
To: musl@...ts.openwall.com, Darjan Krijan <darjan_krijan@....de>
Subject: Re: musl-clang wrapper chokes on <immintrin.h> (Linux x86_64)

On 4/11/23 12:05, Darjan Krijan wrote:
> Hello,
>
> (Mostly copying the bug description I filed in the Arch Linux
> Bugtracker. Was suggested to report upstream.)
>
> The musl-clang wrapper breaks when a C file includes <immintrin.h> (and
> the likes).
> This is due to the wrapper disabling both system and compiler include
> paths entirely with '-nolibinc'.
>
> Additional info:
> * musl 1.2.3-1 on Arch Linux, built like this:
> https://github.com/archlinux/svntogit-community/blob/5af625a2c6e62f211fd59d8df974e457d615613d/trunk/PKGBUILD 
>
>
> 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.
>
> 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.
>
> Regards,
> Darjan
>
I can second this bug report, as I've just encountered a bug that seems 
to be exactly this on my Fedora laptop and was myself thinking about 
making a bug report, but this one sums it up quite well.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.