On 25.01.19 17:24, Matthias Klumpp wrote: > Am Fr., 25. Jan. 2019 um 09:00 Uhr schrieb Matthias Klose <[email protected]>: >> [...] >> "-L-lz" is wrong. What is it supposed to do? > > Link against zlib? The "-L" flag means "pass to the linker" for LDC, > not "set linker directory" as in GCC. > So this says link the target against zlib. > >> And passing libraries in macros known as *glags* is error prone too, as you >> see >> here. > > It's an easy way to ensure stuff is linked against zlib that wasn't > before. LDC embeds a copy of zlib, which is removed, so on Debian all > generated binaries have to link against zlib explicitly, instead of > embedding it. > I don't know why this doesn't work with --as-needed yet (and didn't > look into the issue closely yet as well), if you have an idea, let me > know!
because the -lz appears on the command line before the objects being linked.

