-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect LIBS environment variable #10621
Comments
Wasn't there some GCC discussion about adding |
Perhaps, and I can definitely look into this if you have a link. However this isn't necessarily only the use case - just the particular one that prompted this issue. A change to the gcc specs would take quite a long time before trickling down across the ecosystem. A meson patch would be much faster. |
Found some discussion: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81358 I'm referring to option 4. It apparently was originally implemented, but later limited to whenever Also you're suggesting Meson implement a feature request to enable option 5. ;) |
Yes. Here's my justification:
|
We handle a atomics in mesa and it’s a pain. Regardless of what we do with LIBS I think a built in dependency for atomics might be in order |
GNU autoconf uses the
LIBS
environment variable to specify additional libraries to link.. This variable is distinct fromLDFLAGS
. The latter is for flags that affect the behavior of the linker, while the former is for libraries to link. This means thatLDFLAGS
is free to be placed before the object files in the command line, whileLIBS
must be placed after the object files. The manual is very explicit about this in the description forLDFLAGS
:There is a use-case for this. On some architectures, like riscv, i386, and 32-bit sparc and mips, the GCC __atomic intrinsics are implemented in software via the libatomic library. This means that packages using those intrinsics must link with with
-latomic
, but only on certain platforms. On such platforms, the user will often need to setLIBS="-latomic"
to successfully link. This is easy to do with autotools-based projects, but meson does not know about this environment variable.The text was updated successfully, but these errors were encountered: