Bug#941563: -l option ordering
On Fri, 28 Feb 2025 20:21:48 +0900,
Junichi Uekawa wrote:
>
>
>
> Seems like adding `-lreadline` after the source code would solve the problem. It seems like gcc started checking for missing symbols at shared library link time (like static libs) whereas before it didn't check.
>
> gcc -lreadline -I /usr/include/readline /usr/bin/realcsh.c # fails
> gcc -I /usr/include/readline /usr/bin/realcsh.c -lreadline # succeeds
>
>
> I think it's a gcc change but I can't find the new gcc option to make
> it not do that.
>
The tricky part is that the examples are just a canary and in general
the binfmtc command-line construction needs to take this into
acount. I think the ordering was somewhat hardcoded, and we need to
parse it in such a way so that flags are added in a different
ordering.
Reply to: