tech-toolchain archive

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

Re: Fwd: GNU tools netbsd vs netbsdelf



On Thu, Jun 10, 2021 at 04:10:47PM -0400, John Ericson wrote:
> The issue we've encountered is that GNU tools don't seem to support dynamic linking properly for cross compilation when the "OS" part of the config is "netbsd"; they seems to require "netbsdelf" instead.

Only older platforms that were previously a.out.

The most popular NetBSD platforms have always been ELF,
so are simply "netbsd".

> My first suggestion is that these GNU tools should support <CPU>-netbsd-elf and <CPU>-netbsd-aout as alternative ways of disambiguating. Putting it in an additional "abi" component of the config (this is the 4th component with a vendor (including "pc" or "unknown" in the second position) is something we already support for e.g. bare metal programing that nonetheless use ELF (as supported by the bootloader or whatever). This has the advantage of being a non-breaking change.

I don't see the reason for this change.

Only the kernel has to care about a.out still, the toolchain
no longer supports building a.out binaries.

The ABI component is used for other purposes on e.g. ARM,
so I don't think it would be non-breaking at all.

> My second suggestion would just be to change the meaning of the ambiguous plain "netbsd" to mean ELF rather than a.out by default. NetBSD has, of course, supported ELF for many years now, and other OSes that switched to ELF have made the same change long ago

I agree that "netbsd" should mean ELF by default.

> so this would be hopefully be only a tiny breakage, and one with precedent. See also this comment in GNU config that even anticipates this change [gnu-config-comment].

I would hope that it if you suspect that it would cause breakage
you've evaluated exactly how much breakage it would cause, where,
and how it can be fixed.

Running a pkgsrc bulk build to prove your change doesn't break
anything would be a great gesture to prove it's the right
change.  I'd like to avoid any pain on our side.

cheers,

nia


Home | Main Index | Thread Index | Old Index