Remove curl's LDFLAGS from curl-config --static-libs
authorSimon McVittie <smcv@collabora.com>
Tue, 22 Nov 2022 21:20:51 +0000 (21:20 +0000)
committerSamuel Henrique <samueloph@debian.org>
Tue, 6 Feb 2024 20:52:46 +0000 (20:52 +0000)
commit053c0c9485ccc7e6ece8fe015e5f498aa4b54d71
tree2ed83646020a9d46d636f0799f35cc2fe766f55d
parent464d1672639eb31b1ec383c1896f628999846e09
Remove curl's LDFLAGS from curl-config --static-libs

On current Debian bookworm, the LDFLAGS consist of
-L/usr/lib/${triplet}/mit-krb5 originating from
`pkg-config --libs-only-L mit-krb5-gssapi` from krb5-multidev, plus
some linker options that are intended for curl itself rather than for
dependent packages. None of these are really desirable, and they create
divergence between architectures that would prevent libcurl-*-dev from
being Multi-Arch: same.

The -L flag is not really needed, for the same reason that -L@libdir@
isn't. curl Build-Depends on libkrb5-dev, which doesn't need a special
-L flag to find libgssapi_krb5, and the various libcurl-*-dev packages
have Suggests on libkrb5-dev rather than on krb5-multidev for static
linking.

The other options (currently `-Wl,-z-relro -Wl,-z,now`) are intended
for libcurl itself, and if dependent packages want those options then
they should set them from their own packaging.

Bug-Debian: https://bugs.debian.org/1024668
Forwarded: not-needed
Signed-off-by: Simon McVittie <smcv@collabora.com>
Gbp-Pq: Name Remove-curl-s-LDFLAGS-from-curl-config-static-libs.patch
curl-config.in