Skip to content

WIP: [autotools / gnu tools] use "-l:" for static libraries#11713

Open
jngrb wants to merge 1 commit intoconan-io:developfrom
jngrb:autotools_libs_fix
Open

WIP: [autotools / gnu tools] use "-l:" for static libraries#11713
jngrb wants to merge 1 commit intoconan-io:developfrom
jngrb:autotools_libs_fix

Conversation

@jngrb
Copy link

@jngrb jngrb commented Jul 27, 2022

attempt to solve issue #11703 - tested with gcc and ld on Ubuntu and a Yocto variant

This PR is WIP:

  • TODO: detect that the linker 'ld' is the one in use

Changelog: (Feature | Fix | Bugfix): Describe here your pull request
Docs: https://github.com/conan-io/docs/pull/XXXX

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

attempt to solve conan-io#11703

TODO: detect that the linker 'ld' is the on ein use
@CLAassistant
Copy link

CLAassistant commented Jul 27, 2022

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will try to have some discussion around this for next iteration (1.52, as 1.51 is being shipped right now)

elif library.startswith("lib") and library.endswith(".a"):
# link by filename
# TODO: at this point, we should only use -l:
# if we are sure that we use ld as linker
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably the way to go, aligned with Conan 2.0 design, is not try to detect it, but use a conf that explicitly defines it (opt-in or opt-out depending on the default we chose). Better than tricky, and not 100% robust auto-detections.

if not library.endswith(".lib"):
library += ".lib"
result.append(library)
elif library.startswith("lib") and library.endswith(".a"):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the legacy build systems integrations support, that are already removed in 2.0. Better not touch them.

@memsharded memsharded added this to the 1.52 milestone Jul 27, 2022
@memsharded memsharded modified the milestones: 1.52, 1.53 Aug 29, 2022
@czoido czoido modified the milestones: 1.53, 1.54 Oct 4, 2022
@memsharded memsharded modified the milestones: 1.54, 1.55 Nov 2, 2022
@memsharded memsharded modified the milestones: 1.55, 1.56 Nov 28, 2022
@czoido czoido modified the milestones: 1.56, 1.57 Dec 20, 2022
@memsharded memsharded modified the milestones: 1.57, 1.58 Jan 10, 2023
@memsharded memsharded modified the milestones: 1.58, 1.59 Jan 30, 2023
@czoido czoido modified the milestones: 1.59, 1.60 Feb 16, 2023
@memsharded memsharded modified the milestones: 1.60, 2.X Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants