Skip to content

Grouping archives in SCons link step (for GNU ld) #1161

Open

Description

@bdbaddog

This issue was originally created at: 2005-05-10 13:36:42.
This issue was reported by: scotsalmon.

scotsalmon said at 2005-05-10 13:36:42

Provide a mechanism in SCons for grouping libraries.

The deal is that as you probably know, when the GNU linker considers a library on the command line, it only resolves symbols that are unresolved in an object earlier on the command line, not later objects. So if there are circular dependencies, you end up with extremely messy command lines. It gets even messier than you might first think, because each library may contain multiple objects which aren't even included unless the library is in a certain order, and then those objects have their own circular dependencies.

Fortunately, ld has an "I give up" option for resolving situations like this where you can group sets of circularly-dependent libraries, the -( ... -) option. You bracket a set of libraries with this, and it will keep cycling over the whole set until all of their mutual dependencies are resolved. Unfortunately, this is of course very slow, so the interim solution of bracketing all of LIBFLAGS with this is not really a great idea. It would be better if I could pick and choose sets of libraries I know have this issue and put only those libraries in -( ... -).

issues@scons said at 2005-05-10 13:36:42

Converted from SourceForge tracker item 1199376

gregnoel said at 2008-11-30 12:08:29

Bug party triage. Propose a solution with proxy wrappers, then re-triage.

gregnoel said at 2008-12-26 13:20:26

Adjust triage of issues.

garyo said at 2012-09-01 10:04:01

de-assigning all tickets assigned to Greg Noel (no longer working on SCons)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions