Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and simplify build of static libraries. #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asarhaddon
Copy link
Contributor

gprconfig was generating no Archive_Builder attribute for
mips-linux-gnu, powerpc64le-linux-gnu and many other architectures,
because the regular expressions defining specific architectures and
the fallback were not covering all cases. Ensure that all cases are
covered by the fallback stanza.

Replace many handwritten copies with variable substitutions.

Merge i686-pc-mingw32 and x86_64-pc-mingw32 as already done for other
architectures with aliases.
Merge native x86 into the default stanza.

This merge request was
AdaCore/gprbuild#67 before the split to gprconfig-kb.

This merge request is causing, for at least the third time, a non-trivial merge conflict.

A recent conflict (d9e1487) introduces an error (unless "-ranlib" is a valid command). The change in this request would most probably have prevented such an error.

@Fabien-Chouteau
Copy link
Member

HI @asarhaddon thanks for your contribution.

You should have a look at this change: d49ff15
It is similar to what your are doing here. Except for the use of $PREFIX which is, for some targets, different than, $TARGET.

@burratoo burratoo assigned lambourg and unassigned burratoo Oct 12, 2020
@asarhaddon asarhaddon force-pushed the simplify-build-static-libs branch from 7389eb1 to 41cb918 Compare October 17, 2020 21:35
@asarhaddon
Copy link
Contributor Author

This commit should hopefully fix the initial problem (some Debian architectures are missing a static archiver).

A separate merge request (#4) fixes a probable typo.

You are right that the remaining idea is similar to d49ff15.

  • It seems that the native Archiver stanza plays the role of catch-all stanza for unknown architectures. If so, it may be useful to copy each pattern from its separate Archiver stanza, in the same order, into the list of negated patterns for the native Archiver stanza. There already exists inconsistencies.
  • Why not use "${PREFIX}ar" for both native and cross builds, at least on most architectures?
    • during a native build, "ar" and "${PREFIX}ar" are synonym.
    • during a cross build, "${PREFIX}ar" only is allowed.

@burratoo burratoo removed their request for review October 19, 2020 13:49
@asarhaddon asarhaddon force-pushed the simplify-build-static-libs branch from 41cb918 to 0f68f97 Compare July 16, 2022 06:28
@CLAassistant
Copy link

CLAassistant commented Jul 16, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor

@t-14 t-14 left a comment

Choose a reason for hiding this comment

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

Unfortunately, due to a veritable zoo of architectures that AdaCore has to support, this patch is problematic for us as is. May I suggest that you just add specific triplets you would like to exclude, but leave the generic regexes intact?

@burratoo burratoo reopened this Dec 21, 2022
This covers both native and cross builds, as /usr/bin/TARGET-ar exists in both cases.
@asarhaddon asarhaddon force-pushed the simplify-build-static-libs branch from 0f68f97 to 49a70ab Compare October 24, 2023 23:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants