Viktor Szakats
444f64b3e9
autotools: avoid passing LDFLAGS
twice to libcurl
...
autotools passes `LDFLAGS` automatically linker commands. curl's
`lib/Makefile.am` customizes libcurl linker flags. In that
customization, it added `LDFLAGS` to the custom flags. This resulted in
passing `LDFLAGS` _twice_ to the `libtool` command.
Most of the time this is benign, but some `LDFLAGS` options can break
the build when passed twice. One such example is passing `.o` files,
e.g. `crt*.o` files necessary when customizing the C runtime, e.g. for
MUSL builds.
Passing them twice resulted in duplicate symbol errors:
```
libtool: link: clang-15 --target=aarch64-unknown-linux-musl [...] /usr/lib/aarch64-linux-musl/crt1.o [...] /usr/lib/aarch64-linux-musl/crt1.o [...]
ld.lld-15: error: duplicate symbol: _start
>>> defined at crt1.c
>>> /usr/lib/aarch64-linux-musl/crt1.o:(.text+0x0)
>>> defined at crt1.c
>>> /usr/lib/aarch64-linux-musl/crt1.o:(.text+0x0)
[...]
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```
This behaviour came with commit 1a593191c2769a47b8c3e4d9715ec9f6dddf5e36
(2013-07-23) as a fix for bug https://curl.haxx.se/bug/view.cgi?id=1217 .
The patch was a works-for-me hack that ended up merged in curl:
https://sourceforge.net/p/curl/bugs/1217/#06ef
With the root cause remaining unclear.
Perhaps the SUNPro 12 linker was sensitive to `-L` `-l` order, requiring
`-L` first? This would be unusual and suggests a bug in either the
linker or in `libtool`.
The curl build does pass the list of detected libs via its own
`LIBCURL_LIBS` variable, which ends up before `LDFLAGS` on the `libtool`
command line, but it's the job of `libtool` to ensure that even
a peculiar linker gets the options in the expected order. Also because
autotools passes `LDFLAGS` last, making it hardly possible to pass
anything after it.
Perhaps in the 10 years since this issue, this already got a fix
upstream.
This patch deletes `LDFLAGS` from our customized libcurl options,
leaving a single copy of them as passed by autotools automatically.
Reverts 1a593191c2769a47b8c3e4d9715ec9f6dddf5e36
Closes #12310
2023-11-14 19:28:15 +00:00
..
2023-09-20 13:38:42 +02:00
2023-11-11 23:44:43 +01:00
2023-11-06 13:14:06 +01:00
2023-11-11 23:35:47 +01:00
2021-09-09 07:53:42 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-11-11 23:35:47 +01:00
2023-01-03 09:19:21 +01:00
2023-07-20 23:41:47 +02:00
2023-08-31 23:02:10 +00:00
2023-10-26 17:42:54 +02:00
2023-11-11 23:35:47 +01:00
2023-10-26 17:29:17 +02:00
2023-01-03 09:19:21 +01:00
2023-10-04 23:22:16 +02:00
2023-09-23 10:50:10 +02:00
2023-09-23 10:50:10 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-11-06 13:14:06 +01:00
2023-09-03 18:42:37 +02:00
2023-11-06 13:14:06 +01:00
2023-04-06 13:04:46 +02:00
2023-11-11 23:35:47 +01:00
2023-04-06 13:04:46 +02:00
2023-11-11 23:35:47 +01:00
2023-05-23 11:08:51 +02:00
2023-11-11 23:35:47 +01:00
2023-03-02 08:48:34 +01:00
2023-11-11 23:35:47 +01:00
2023-05-25 14:34:39 +02:00
2023-11-11 23:35:47 +01:00
2023-10-27 16:59:13 +02:00
2023-11-10 18:24:14 +00:00
2023-11-06 17:20:39 +00:00
2023-10-27 00:37:34 +00:00
2023-09-28 22:58:36 +02:00
2023-11-06 17:20:39 +00:00
2023-11-06 17:20:39 +00:00
2023-11-06 17:20:39 +00:00
2023-11-06 22:00:10 +00:00
2023-11-06 22:00:10 +00:00
2023-10-20 16:59:52 +02:00
2023-06-12 23:53:00 +02:00
2023-11-11 23:35:47 +01:00
2023-05-23 11:08:51 +02:00
2023-11-07 16:35:30 +01:00
2023-11-07 16:35:30 +01:00
2023-11-11 23:35:47 +01:00
2023-09-15 22:09:43 +02:00
2023-05-23 10:42:09 +02:00
2023-01-03 09:19:21 +01:00
2023-07-31 11:51:34 +02:00
2023-11-06 17:20:39 +00:00
2023-09-14 03:07:45 -04:00
2023-07-29 23:44:28 +02:00
2023-07-29 23:44:28 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-03-10 08:04:42 +01:00
2023-01-03 09:19:21 +01:00
2023-09-20 13:38:42 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-09-07 17:45:06 +02:00
2023-09-07 17:45:06 +02:00
2023-06-07 13:06:08 +00:00
2023-01-03 09:19:21 +01:00
2023-09-26 14:25:10 +00:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-08-08 10:44:01 +02:00
2023-07-29 23:44:28 +02:00
2023-10-21 10:29:02 +02:00
2023-01-03 09:19:21 +01:00
2023-05-18 20:45:04 +02:00
2023-01-03 09:19:21 +01:00
2023-06-07 13:06:08 +00:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-04-25 12:38:38 +02:00
2023-01-03 09:19:21 +01:00
2023-09-07 17:45:06 +02:00
2023-01-04 15:36:36 +01:00
2023-11-06 17:20:39 +00:00
2023-11-06 22:00:10 +00:00
2023-09-07 17:45:06 +02:00
2023-01-03 09:19:21 +01:00
2023-11-03 03:50:59 -04:00
2023-09-23 09:12:57 +00:00
2023-09-23 09:12:57 +00:00
2023-10-27 00:37:34 +00:00
2023-10-27 00:37:34 +00:00
2023-01-03 09:19:21 +01:00
2023-05-18 20:45:04 +02:00
2023-01-03 09:19:21 +01:00
2023-11-11 23:35:47 +01:00
2023-01-03 09:19:21 +01:00
2023-11-01 10:53:49 +01:00
2023-10-09 18:34:17 +02:00
2023-10-21 14:36:51 +02:00
2023-10-21 14:36:51 +02:00
2023-10-12 23:40:08 -04:00
2023-11-13 23:00:53 +01:00
2023-01-03 09:19:21 +01:00
2023-04-25 23:16:51 +02:00
2023-06-05 20:08:37 +02:00
2023-01-03 09:19:21 +01:00
2023-09-30 11:45:39 +02:00
2023-09-30 11:45:39 +02:00
2023-11-06 13:14:06 +01:00
2023-01-03 09:19:21 +01:00
2023-03-28 10:11:33 +02:00
2023-03-28 10:11:33 +02:00
2023-09-16 11:37:57 +02:00
2023-01-03 09:19:21 +01:00
2023-11-02 20:35:20 +01:00
2023-07-31 08:31:38 +02:00
2023-11-11 23:35:47 +01:00
2023-03-13 09:07:23 +01:00
2023-10-03 21:37:56 +00:00
2023-03-03 23:25:30 +01:00
2023-01-03 09:19:21 +01:00
2023-10-19 17:00:35 +02:00
2023-06-12 23:53:00 +02:00
2023-01-03 09:19:21 +01:00
2023-09-05 16:36:03 +02:00
2023-01-03 09:19:21 +01:00
2023-04-14 09:26:26 +02:00
2023-01-03 09:19:21 +01:00
2023-08-07 12:45:45 +02:00
2023-01-03 09:19:21 +01:00
2023-09-20 13:38:42 +02:00
2023-10-26 17:29:17 +02:00
2023-01-03 09:19:21 +01:00
2023-10-28 00:27:20 -04:00
2023-11-11 23:35:47 +01:00
2023-10-20 23:00:10 +02:00
2023-01-03 09:19:21 +01:00
2023-11-13 15:36:24 +01:00
2023-01-03 09:19:21 +01:00
2023-09-25 20:12:18 +02:00
2023-09-25 20:12:18 +02:00
2023-11-11 23:35:47 +01:00
2023-05-23 11:08:51 +02:00
2023-11-05 10:35:45 +01:00
2023-01-03 09:19:21 +01:00
2023-09-28 10:00:13 +02:00
2023-01-03 09:19:21 +01:00
2023-09-07 17:45:06 +02:00
2023-09-07 17:45:06 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-10-25 09:34:32 +02:00
2023-09-25 20:12:18 +02:00
2023-11-11 23:35:47 +01:00
2023-11-13 01:14:18 -05:00
2023-10-05 03:11:41 -04:00
2023-08-17 08:21:08 +02:00
2023-08-17 17:17:59 +02:00
2023-01-03 09:19:21 +01:00
2023-11-11 23:35:47 +01:00
2023-01-04 15:36:36 +01:00
2023-09-27 13:18:22 +02:00
2023-01-03 09:19:21 +01:00
2023-03-03 10:05:08 +01:00
2023-01-03 09:19:21 +01:00
2023-09-07 16:17:13 +02:00
2023-11-06 13:14:06 +01:00
2022-04-20 15:26:13 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-07-29 23:42:53 +02:00
2023-07-29 23:42:53 +02:00
2023-11-14 19:28:15 +00:00
2023-10-03 12:58:17 +00:00
2023-10-28 10:06:43 +00:00
2023-01-03 09:19:21 +01:00
2023-11-08 17:55:22 +00:00
2023-09-07 17:45:06 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-09-16 11:37:57 +02:00
2023-09-16 11:37:57 +02:00
2023-11-06 22:00:10 +00:00
2023-11-06 13:14:06 +01:00
2023-10-09 18:34:17 +02:00
2023-10-26 17:29:17 +02:00
2023-03-26 17:43:28 +02:00
2023-09-26 03:51:13 -04:00
2023-05-18 20:45:04 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-04-12 09:00:20 +02:00
2023-01-04 09:15:37 +01:00
2023-11-06 13:14:06 +01:00
2023-01-12 14:59:38 +01:00
2023-05-18 20:45:04 +02:00
2023-01-03 09:19:21 +01:00
2023-09-21 08:56:50 +02:00
2023-01-03 09:19:21 +01:00
2023-11-11 23:35:47 +01:00
2023-01-04 15:36:36 +01:00
2023-11-06 13:14:06 +01:00
2023-09-23 11:20:20 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-11-06 10:11:56 +00:00
2023-09-16 11:37:57 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-11-06 13:14:06 +01:00
2023-10-21 14:38:21 +02:00
2023-05-19 16:16:26 +02:00
2023-01-03 09:19:21 +01:00
2023-11-06 13:14:06 +01:00
2023-11-06 13:14:06 +01:00
2023-11-13 15:36:24 +01:00
2023-01-03 09:19:21 +01:00
2023-08-30 11:38:27 +02:00
2023-08-01 21:58:56 +00:00
2023-10-24 21:06:36 +00:00
2023-09-07 17:45:06 +02:00
2023-01-03 09:19:21 +01:00
2023-11-06 22:00:10 +00:00
2023-09-26 14:25:10 +00:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-11-06 13:14:06 +01:00
2023-06-07 13:06:08 +00:00
2023-11-11 23:35:47 +01:00
2023-01-04 15:36:36 +01:00
2023-01-03 09:19:21 +01:00
2023-05-18 20:45:04 +02:00
2023-10-18 08:23:53 +02:00
2023-01-31 11:23:59 +01:00
2023-01-31 11:23:59 +01:00
2023-11-11 23:35:47 +01:00
2023-05-23 11:08:51 +02:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-11-05 23:21:18 +01:00
2023-11-05 23:21:18 +01:00
2023-11-03 03:50:59 -04:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-07-26 23:57:08 +02:00
2023-09-23 11:20:20 +02:00
2023-01-03 09:19:21 +01:00
2023-11-06 13:14:06 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-09-28 09:52:20 +02:00
2023-09-28 09:52:20 +02:00
2023-11-06 13:14:06 +01:00
2023-01-03 09:19:21 +01:00
2023-11-13 15:36:24 +01:00
2023-10-27 16:55:54 +02:00
2023-04-27 08:36:51 +02:00
2023-11-11 23:35:47 +01:00
2023-11-13 15:36:24 +01:00
2023-01-03 09:19:21 +01:00
2023-01-03 09:19:21 +01:00
2023-10-30 17:02:13 +01:00
2023-09-25 17:06:33 +02:00
2023-06-07 13:06:08 +00:00
2023-10-27 00:37:34 +00:00
2023-04-25 23:16:51 +02:00