sdl2-config can fail when using clang over gcc.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libsdl2 (Debian) |
Fix Released
|
Unknown
|
|||
libsdl2 (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
The following will fail:
$ CC=clang /usr/bin/
clang: error: unsupported option '-print-multiarch'
clang: error: no input files
...
Whereas using gcc as compiler will work correctly:
CC=gcc /usr/bin/
/usr/lib/
This is because clang does not know the flag -print-multiarch
This makes it hard to use sdl2-config to query what flags to use when linking an SDL2 application statically.
OS: I have encountered this issue both in lunar lobster and mantic minotaur.
SDL2 version: 2.28.3+dfsg-2
Expected behaviour: no error, as in gcc case, when using clang.
$ lsb_release -rd
No LSB modules are available.
Description: Ubuntu Mantic Minotaur (development branch)
Release: 23.10
Changed in libsdl2 (Debian): | |
status: | Unknown → Fix Released |
Related:
[1] https:/ /github. com/llvm/ llvm-project/ commit/ e05edb19adbfd1b 24f58d583e4b5b4 d742f982ee
This looks like a valid issue which I can reproduce locally on my Mantic system, but I am not sure the issue should be fixed in Ubuntu. Given that clang explicitly disabled support for -print-multiarch in [1], I doubt that's the right project to report this issue against.
I suggest reporting the issue against libsdl:
https:/ /github. com/libsdl- org/SDL/ issues
and see what they think about it.