~mcf/cproc

1

Suggestion: add -L /usr/lib to linkflags for *-linux-* target

Details
Message ID
<Z6e6qrLez9PoJz6v@pinebook>
Sender timestamp
1739045546
DKIM signature
pass
Download raw message
Current configure script assumes that ld on Linux has a default list of
library search paths, like GNU ld.bfd. This caused problems when testing
`mold --run cproc', since mold[1] has no default search paths. While this is
easily fixed by passing -L/usr/lib, ld errors are not known for being
user-friendly or easily diagnosed. To support greater variety of `ld's on
Linux, should -L /usr/lib be added to linkflags?

Pros: ability to swap out any part of the toolchain is in the spirit of the
project, since cproc itself is likely to be dropped in to replace gcc/clang

Cons: personally I have no experience on any Linux where /{usr/,}lib{,64}
didn't all point to the same location; is there any occasion where the
configure script would have to guess a distinction between them?

[1]: https://github.com/rui314/mold
Details
Message ID
<1a0d4177-a3fc-42a6-b0c5-4406ce5fd805@app.fastmail.com>
In-Reply-To
<Z6e6qrLez9PoJz6v@pinebook> (view parent)
Sender timestamp
1742049420
DKIM signature
pass
Download raw message
On Sat, Feb 8, 2025, at 21:12, lhr@disroot.org wrote:
> Current configure script assumes that ld on Linux has a default list of
> library search paths, like GNU ld.bfd. This caused problems when testing
> `mold --run cproc', since mold[1] has no default search paths. While this is
> easily fixed by passing -L/usr/lib, ld errors are not known for being
> user-friendly or easily diagnosed. To support greater variety of `ld's on
> Linux, should -L /usr/lib be added to linkflags?

I am not sure I understand the problem you are facing. Can it be
solved by building qbe with `make LDFLAGS="-L /usr/lib"`? If so
I'd be reluctant to change the Makefile as it's been working for
most for a while now.
Reply to thread Export thread (mbox)