[Issue 19724] New: Regression: wrong order of linker arguments, again: -L-l before -L--start-group

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 7 11:35:36 UTC 2019


https://issues.dlang.org/show_bug.cgi?id=19724

          Issue ID: 19724
           Summary: Regression: wrong order of linker arguments, again:
                    -L-l before -L--start-group
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: default_357-line at yahoo.de

When explicitly specifying libraries to be passed to the linker, they are
reordered to the end. That's bad, because it breaks -L=--start-group and
-L=--end-group.

Linker groups define a set of libraries that are evaluated circularly until all
symbols are resolved.

Repro:

touch test.d
dmd -L=--start-group -L=-lfoo -L=--end-group

Expected:

cc -Xlinker --start-group -lfoo -Xlinker --end-group

Actual:

cc -Xlinker --start-group -Xlinker --end-group -lfoo

This is obviously quite useless.

--


More information about the Digitalmars-d-bugs mailing list