Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940471 - dev-lang/gnat-gpl: split into stripped down dev-lang/ada-bootstrap
Summary: dev-lang/gnat-gpl: split into stripped down dev-lang/ada-bootstrap
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Linux ADA team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 137268 940472 919667
  Show dependency tree
 
Reported: 2024-09-29 01:21 UTC by Sam James
Modified: 2024-10-01 16:35 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-29 01:21:05 UTC
Same as for D (bug 940470).

As I mentioned in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=799693623d76c89e8b04d2434d0dfece44bb49f9:
"""
Remaining bits to be done:
* Adapting/replacing/supplementing dev-lang/gnat-gpl with a version that
  can be installed in parallel to sys-devel/gcc:10 so it can be pulled
  in transparently for bootstrapping;
* ...
"""

We should perhaps copy dev-lang/gnat-gpl into dev-lang/ada-bootstrap (or dev-lang/gnat-bootstrap, whatever) and strip it down so it *only* builds Ada and it does so in a special location which doesn't collide with sys-devel/gcc:10.

Later on, we can figure out building our own / sourcing our own binaries but that's separate.
Comment 1 Luke A. Guest 2024-09-29 18:19:33 UTC
Use this as a start:

https://github.com/Lucretia/ada-overlay/tree/master/dev-lang/ada-bootstrap (needs reworking I think for the deps).

And build script: https://github.com/Lucretia/ada-overlay/blob/master/scripts/build-bootstrap.sh

It can be used for other languages from gcc which need a bootstrap too.
Comment 2 Larry the Git Cow gentoo-dev 2024-09-30 02:02:32 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ce76a16c8f6e283f277190e4b86dfea8fc38cb3

commit 1ce76a16c8f6e283f277190e4b86dfea8fc38cb3
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-30 01:59:37 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-30 02:00:49 +0000

    toolchain.eclass: add bug reference to ada-bootstrap comment
    
    Bug: https://bugs.gentoo.org/940471
    Bug: https://bugs.gentoo.org/940472
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/toolchain.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 3 Larry the Git Cow gentoo-dev 2024-09-30 02:40:20 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a048a1e1457b4e7aece98a673bd284563b48c96e

commit a048a1e1457b4e7aece98a673bd284563b48c96e
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-30 02:39:26 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-30 02:39:26 +0000

    profiles/base: force dev-lang/gnat-gpl[ada]
    
    gnat-gpl only exists for (bootstrapping) Ada. Until bug #940471 is handled,
    force Ada on. Once it is split/moved/gutted, this won't be necessary
    as it'll always build Ada.
    
    Bug: https://bugs.gentoo.org/940471
    Signed-off-by: Sam James <sam@gentoo.org>

 profiles/base/package.use.force | 6 ++++++
 1 file changed, 6 insertions(+)
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-30 21:44:00 UTC
(In reply to Luke A. Guest from comment #1)
> Use this as a start:
> 
> https://github.com/Lucretia/ada-overlay/tree/master/dev-lang/ada-bootstrap
> (needs reworking I think for the deps).
> 
> And build script:
> https://github.com/Lucretia/ada-overlay/blob/master/scripts/build-bootstrap.
> sh
> 
> It can be used for other languages from gcc which need a bootstrap too.

Thanks. We'll need it for D as well.
Comment 5 Larry the Git Cow gentoo-dev 2024-10-01 01:11:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e6a69ea10ed74a0ce49e979bbc4bbce139949259

commit e6a69ea10ed74a0ce49e979bbc4bbce139949259
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-10-01 01:02:17 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-10-01 01:10:28 +0000

    toolchain.eclass: support dev-lang/ada-bootstrap
    
    Bug: https://bugs.gentoo.org/547358
    Bug: https://bugs.gentoo.org/919667
    Bug: https://bugs.gentoo.org/940472
    Closes: https://bugs.gentoo.org/940471
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/toolchain.eclass | 42 +++++++++++++++++++++++++++++++++---------
 1 file changed, 33 insertions(+), 9 deletions(-)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fecbe438a39dfc3b226ff2c474c297a0763998f

commit 2fecbe438a39dfc3b226ff2c474c297a0763998f
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-09-30 20:01:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-10-01 01:10:27 +0000

    dev-lang/ada-bootstrap: new package, add 0_p2021
    
    Split dev-lang/gnat-gpl into dev-lang/ada-bootstrap. This ebuild
    was initially a clone of dev-lang/gnat-gpl-2021-r5 then had some
    cleanups done, toolchain.eclass use removed, and simplified what it
    configures/builds/installs.
    
    As I mentioned in 799693623d76c89e8b04d2434d0dfece44bb49f9, there were
    two jobs left -- this fixes the first one: splitting dev-lang/gnat-gpl
    into its own package which doesn't collide with sys-devel/gcc:10 and
    also does the least possible work, not with lots of USE, etc.)
    
    Some inspiration taken from sys-devel/bpf-toolchain. Considered
    using the *-toolchain name again but given the purpose of this is *not*
    just to avoid crossdev use but instead to bootstrap from a binary for Ada,
    it didn't feel appropriate.
    
    (Planned to do this anyway but the issue mentioned in
    9732ef3475830dbe289fc80358613e90b612563c pushed me to get on with it now.)
    
    Later versions of ada-bootstrap will be our own binaries for both
    newer GCC as a base (although this is mostly a nice-to-have and to keep
    things building rather than it being essential, AFAIK) as well as more
    importantly musl and other arch support.
    
    For that future work, see https://bugs.gentoo.org/940471#c1 for a
    suggestion from Luke A. Guest. That will be tracked in bug #940472.
    
    Bug: https://bugs.gentoo.org/547358
    Bug: https://bugs.gentoo.org/919667
    Bug: https://bugs.gentoo.org/940472
    Closes: https://bugs.gentoo.org/940471
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/ada-bootstrap/Manifest                    |   5 +
 .../ada-bootstrap/ada-bootstrap-0_p2021.ebuild     | 183 +++++++++++++++++++++
 .../files/ada-bootstrap-0_p2021-gentoo.patch       |  72 ++++++++
 .../files/gcc-configure-texinfo.patch              |  16 ++
 dev-lang/ada-bootstrap/metadata.xml                |   7 +
 5 files changed, 283 insertions(+)
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-01 03:41:55 UTC
OK, the splitting / replacement part is pretty much done. I may need to polish it a bit more though. But the groundwork is there for bug 940472 now.
Comment 7 Luke A. Guest 2024-10-01 08:57:20 UTC
(In reply to Sam James from comment #4)

> Thanks. We'll need it for D as well.

I don't know if the configure for GM2 will use a prebuilt compiler or not or whether it just builds it's own bootstrap every time.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-10-01 10:09:04 UTC
(In reply to Luke A. Guest from comment #7)
> (In reply to Sam James from comment #4)
> 
> > Thanks. We'll need it for D as well.
> 
> I don't know if the configure for GM2 will use a prebuilt compiler or not or
> whether it just builds it's own bootstrap every time.

AFAIK it builds its own bootstrap (I've had it enabled since it got merged into gcc w/ no issues, including on new installs).
Comment 9 Luke A. Guest 2024-10-01 16:35:35 UTC
(In reply to Sam James from comment #8)

> AFAIK it builds its own bootstrap (I've had it enabled since it got merged
> into gcc w/ no issues, including on new installs).

I know that. I said I didn't know if it already checks to see if there was an existing bootstrap so it didn't have to.