• Bug#941563: -l option ordering

    From Junichi Uekawa@21:1/5 to Junichi Uekawa on Tue Mar 4 11:10:01 2025
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)