[PATCH] gdbserver/linux: probe for libiconv in configure
Tom Tromey
tom@tromey.com
Thu Feb 29 20:45:14 GMT 2024
>>>>> "Simon" == Simon Marchi <simon.marchi@efficios.com> writes:
>> I don't think adding some more checks to all hosts is a big enough deal
>> to bother with the 'case'.
Simon> The case is not to avoid the configure check, but to avoid linking
Simon> against libiconv on hosts where gdbserver doesn't need libiconv.
Simon> Let's say you're on freebsd and that on freebsd libiconv is a separate
Simon> library, not built into libc. gdbserver on freebsd doesn't need
Simon> libiconv. So even if libiconv is found by AM_ICONV, I don't want to
Simon> pass those flags ($LIBICONV) to the linker, on freebsd. That's why I
Simon> introduced the MAYBE_LIBICONV variable, which is only set for Linux
Simon> hosts
Simon> But if you tell me that linking against libiconv even if not necessary
Simon> is not a big deal, I can simplify it.
Well, it's probably not a big deal, since normally people would ask for
this, and one more library is either (1) not used if it is static (no
functions needed during the link), or (2) just some entry in a dynamic
table somewhere.
However, sorry I misunderstood the purpose of the check. It's also fine
in this case to do that, I guess with some comment, as iconv is only
needed by linux-low, which is only going to be used on linux hosts.
Tom
More information about the Gdb-patches
mailing list