Current-Users archive

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

Re: Building old systems




> On Apr 19, 2023, at 6:41 PM, Brook Milligan <brook%nmsu.edu@localhost> 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



Home | Main Index | Thread Index | Old Index