> On Apr 19, 2023, at 6:41 PM, Brook Milligan <br...@nmsu.edu> wrote:
>
> Indeed, this (without -O) works. The key is the HOST_CFLAGS variable; I was
> thinking of just CFLAGS at first.
I have had some luck with compiling old systems with -V HOST_CFLAGS=-fcommon.
That only goes so far into the past, however. I thought the next step would be
to try building even older systems with the compiler from oldest successful
build. So, I tried setting HOST_CC and HOST_CXX to point to an oldish, but
successfully built toolset that also successfully compiled its own kernel.
That is, I run build.sh with -V
HOST_CC=/path/to/oldish/tooldir/bin/armv7--netbsdelf-eabihf-gcc (and similarly
for HOST_CXX), where those compilers are not the native systems compilers but
ones used in a successful kernel build for a checkout somewhat after the target
checkout.
That has led to errors like the following:
/path/to/oldish/tooldir/bin/ld: cannot find crt0.o: No such file or
directory
Iām guessing this means that some other environment variables are not set so
the compiler is looking in the wrong place, but BUILDING is not helping me
think of what that would be. All paths are absolute, except they do include
ā..ā In them.
What should I be configuring to make sure that a tooldir compiler is usable?
Thanks a lot for pointers.
Cheers,
Brook