From: Darjan Krijan <darjan_krijan@gmx.de>
To: musl@lists.openwall.com
Subject: [musl] musl-clang wrapper chokes on <immintrin.h> (Linux x86_64)
Date: Tue, 11 Apr 2023 12:05:15 +0200 [thread overview]
Message-ID: <114dbabd-9745-3655-9c21-486afa2b8d7c@gmx.de> (raw)
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
next reply other threads:[~2023-04-11 10:05 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-11 10:05 Darjan Krijan [this message]
2023-04-11 17:04 ` Gabriel Ravier
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=114dbabd-9745-3655-9c21-486afa2b8d7c@gmx.de \
--to=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).