On Thu, 15 Jan 2026, Guillem Jover wrote:

>Having slept over it, I think upstream use of LDFLAGS for direct ld
>calls is just unsafe, as the general expectation is that this is to
>be used via the compiler

Yes; consider compiler flags like -pthread that imply -lpthread
(okay, not on glibc systems, but there’s more to the world).

>I'm thinking to hold off a bit on introducing the new variable, and
>I've asked autotools upstream for an agreed name for it, so that we

I’d rather it not exist, otherwise, maintainers will have to add
things to both DEB_LDFLAGS_MAINT_APPEND and another variable, and
if they add things that do require the compiler, they’re still out
of luck.

Better to not make build system maintainers believe LDFLAGS (or any
other variable) can be used with direct ld(1) calls, or that direct
ld(1) calls even can be used to link anything.

(Something like ld -r -o foo.lo *.o is probably still safe-ish…)

bye,
//mirabilos
-- 
15:41⎜<Lo-lan-do:#fusionforge> Somebody write a testsuite for helloworld :-)

Reply via email to