mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Gabriel Ravier <gabravier@gmail.com>
To: musl@lists.openwall.com, Darjan Krijan <darjan_krijan@gmx.de>
Subject: Re: [musl] musl-clang wrapper chokes on <immintrin.h> (Linux x86_64)
Date: Tue, 11 Apr 2023 19:04:26 +0200	[thread overview]
Message-ID: <66276879-a71d-1519-77e0-34b3bae00693@gmail.com> (raw)
In-Reply-To: <114dbabd-9745-3655-9c21-486afa2b8d7c@gmx.de>

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.


      reply	other threads:[~2023-04-11 17:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-11 10:05 Darjan Krijan
2023-04-11 17:04 ` Gabriel Ravier [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=66276879-a71d-1519-77e0-34b3bae00693@gmail.com \
    --to=gabravier@gmail.com \
    --cc=darjan_krijan@gmx.de \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).