tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: wip/gcc10-aux promote to stable and feedback

Well, after a bit of waiting... or a lot; I would like to bring the
attention back to this package.

Could someone review it? If pkgsrc ever wants to have support for
newer Ada packages, this has to be pulled in. The biggest package that
needs an updated GCC Ada compiler is GHDL, the open source VHDL

I could pull the latest changes from gcc-10 if there are any and apply
them to this package. There is also a bug in one of my patches, but it
is irrelevant. Since I copy pasted the Ada runtime support for x86* to
arm/aarch64, I forgot to delete the x86 intrinsics (which do not exist
for arm*). I say this is irrelevant since GCC with Ada cannot be
compiled for arm* targets outside of NetBSD-src since binutils, etc;
only work there for those targets when using NetBSD-src.

As an added extra, I managed to compile GCC with Ada support for
NetBSD-powerpc and ran the test suite there! :D I believe this is the
first time this was achieved. I managed to get it by just copypasting
the runtime entry for x86 into the powerpc one (and deleting the x86
intrinsics); it was really that simple.


Am Fri, 03 Dec 2021 22:04:53 +0000
schrieb "Fernando Oleo Blanco" <>:

> Hello everybody,
> I created/modified/updated the wip/gcc10-aux package. Basically, it is
> gcc10 with Ada support and I would like it to make it into stable.
> The package relies explicitly on gcc6-aux to have an Ada compiler in
> the system. It does not state that it uses Ada. This way, it does not
> rely on the pkgsrc infra to select the correct compiler. This was done
> as a recommendation in case gcc10-aux becomes the new Ada base
> compiler. Its files are based on those from gcc10.
> It has been tested by several people and builds correctly on x86_64
> systems, both in NetBSD-current and NetBSD-9.2 [1]. Other systems have
> not been tested, but they should just work. The patches that are
> applied have been done in such a way that FreeBSD and DragonflyBSD
> also compile (tested in gcc11 from Ravenports, which uses the same
> set of patches).
> Current limitations, issues:
> - Only works where gcc6-aux runs. So only x86* arches/systems.
> Ideally, in the future, new binary seeds would be produced for more
>   arches/systems and be consumed directly.
> - When using the compiler as the "main system compiler", e.g.
>   PATH=/usr/pkg/gcc10-aux/bin:$PATH; packages in pkgsrc that
> explicitly depend on >=gcc10 (maybe other >=gcc* too), fail to
> compile. The reason is that the configuration step of those packages
> fail to work. Yes, you heard it right, configure says that the
> compiler cannot compile code... Which is just not true. If you copy
> the code snippet that it uses to test if the compiler can generate
> binaries, compile it manually, it just-works TM. I really do not
> understand what is happening... It makes no sense, but I cannot spend
> more time on it. You can try this by installing gcc10-aux, add it to
> the PATH as indicated and try to compile gcc10.
> gcc10-aux passes all the ACATS tests on NetBSD except for 6, which
> require specific OS support. This limitation is OS related and J.
> Marino already sent a message to the corresponding ML [2]. It also
> compiles gprbuild/xmlada/alire/gnatcoll-core v21 correctly (very
> important Ada packages that hopefully will make it into pkgsrc in the
> not so distant future). V22 of those packages requires gcc11.
> As an extra note. I tried xcompiling gcc10 with Ada support to
> NetBSD-aarch64 (RPi 3) to have another native compiler and start
> generating binary seeds. This has been a glorious failure.
> Upstream binutils does not support NetBSD-aarch64. I had to get the
> ones from src. I can get a xcompiler, but when I use the xcompiler to
> aarch64, the linker adds boggus paths that get recognised as files and
> the compilation fails. I have tried some other different techniques to
> no avail...
> The closest I have gotten is enabling Ada in src, inside its gcc. I
> can get it to build, but the build directory gets eliminated :_) (I
> have to recompile everything with the clean disabled to confirm that
> it is there correctly) It does not get installed since NetBSD infra
> does not know anything about Ada. It should not be too difficult to
> get it right, but it would require a large ammount of work and
> knowledge of the build system of NetBSD, neither of which I can
> provide/have. I have instructions on how to get it to compile
> however, if anybody wants them.
> Anyhow, thanks for reading. Please, consider adding wip/gcc10-aux to
> stable and any feedback is appreciated.
> Regards,
> Fernando Oleo Blanco
> [1]
> [2]

Home | Main Index | Thread Index | Old Index