tech-toolchain archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Host requirements to build the Tools binaries
On Sat, 2024-08-31 at 14:10 -0700, Greg A. Woods wrote:
> At Sat, 17 Aug 2024 19:21:10 +1200, Lloyd Parkes
> <lloyd%must-have-coffee.gen.nz@localhost> wrote:
> Subject: Re: Host requirements to build the Tools binaries
> >
> > It was a mind boggling endless stream of fail just trying to
> > build a plain old GNU make 3.81 on modern Linux with GCC 14.
>
> I'm a little late in the game here, but I wonder if you told GCC-14
> to
> conform to the appropriate C Standard for that old legacy code or
> not.
>
> I.e. did you add the appropriate "-std=gnu89", "-std=gnu99", or
> whatever is right for an older GNU Make?
I thought about that for the rest of tools but that would involve
working out what the host compiler is so that we don't pass GCC options
to something that doesn't want them. It just didn't seem clean to me.
> > This is not the first piece of GNU software that I seen fail to
> > build
> > on leading edge GNU systems.
>
> It is, to me, crazy to try to use a newer compiler to compile legacy
> code without first telling the compiler that it should treat the
> legacy
> code as legacy code. If you did not do this then that is most of
> your
> problem.
It's not so much that the code was written to an older language
standard, it's more that back then the programmers just went YOLO.
Importing the latest GNU make only took a couple of minutes and gave me
100% less headache and 100% less YOLO.
> It is my current (somewhat limited) experience with testing my own
> legacy code and some few legacy packages against GCC-14 and Clang-16
> that there are no "new" problems with this code when I tell those
> compilers to conform to the appropriate language standard for the
> code
> being compiled.
I agree. I just felt that GNU make 3.81 wasn't worth saving.
> This probably applies to building the NetBSD toolchain on any foreign
> host as well. In my not-so-current current source tree I find only
> xz-include/Makfile.inc setting the appropriate "-std=c99" flag.
Despite my previous comment about host compilers, I suspect that most
people are building with GCC even if that isn't their vendor supplied
compiler. Also I'm sure I've seen vendor compiler accept GCC command
line options because too many software authors assume every compiler is
GCC.
Ngā mihi,
Lloyd
Home |
Main Index |
Thread Index |
Old Index