gnustep / tools-make

The makefile package is a simple, powerful and extensible way to write makefiles for a GNUstep-based project.
https://www.gnustep.org/
GNU General Public License v3.0
29 stars 43 forks source link

GS_CHECK_ABI20_LINKER not working as intended #36

Closed hmelder closed 1 year ago

hmelder commented 1 year ago

As described in the clang manpage:

-print-prog-name=<name>
              Print the full program path of name.

The current linker check function greps this path for occurrences of lld, ld, or gold. As demonstrated below, this does not work and probably has never worked (except when changing the linker system-wide).

hugo@GNUstep:/tmp$ clang -Wl,--verbose -fuse-ld=lld --print-prog-name=ld
/usr/bin/ld
hugo@GNUstep:/tmp$ clang -Wl,--verbose -fuse-ld=lld --print-prog-name=ld.lld
/usr/bin/ld.lld

There are multiple ways to check for the linker:

  1. Pass -Wl,--verbose as compiler argument and grep the output
  2. Check LDFLAGS for -fuse-ld
hmelder commented 1 year ago

Fixed via #37