Skip to content

_LIBFLAGS value set by Tool/link.py erroneous #2925

Closed

Description

@bdbaddog

This issue was originally created at: 2013-12-10 09:59:16.
This issue was reported by: aames0815.

aames0815 said at 2013-12-10 09:59:16

Hi all,

Tool/link.py sets _LIBFLAGS so that _stripixes is called on the library namespecs. This makes usage of lib namespaces like :libtelnet.a (please note the leading colon, which is supported at least by GNU ld) impossible as it ends up on the command line of the link editor as -l:libtelnet which is obviously broken.

For a description of how the :libtelnet.a value is meant to work, please see the description of the argument of the --library option, for instance on https://sourceware.org/binutils/docs/ld/Options.html#Options.

As a workaround I manually set _LIBFLAGS back to its default value as provided by Defaults.py, i.e. just using _concat. Then the command line of the link editor is assembled as intended.

The dependency tracking doesn't recognise libtelnet.a as a dependency in either case.

cheers,

aa

bdbaddog said at 2013-12-10 11:28:49

Can you post a small example to demonstrate your issue?

aames0815 said at 2013-12-11 00:50:30

Created an attachment (id=931)
Small sample to reproduce the issue

aames0815 said at 2013-12-11 00:56:15

Hi William,

please find a sample attached as requested.

It works on Ubuntu 12.04. Please extract the tarball, cd into scons_libflags_issue and run scons. It will fail to link. If you edit the sconstruct file to uncomment line 9, the link works.

If you then run "scons --tree=all libflags_sample" you can see, that libtelnet.a is not recognised as a dependency.

cheers,

aa

aames0815 attached scons_libflags_issue.tar.gz at 2013-12-11 00:50:30.

Small sample to reproduce the issue

Activity

  1. added
    Tools
    on Jan 2, 2018
  2. mwichmann commented on Oct 30, 2023

    @mwichmann
    Collaborator

    Fixed via #4429.

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

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions