On 2019-04-05 11:42, Greg Troxel wrote:
It only uses GCC_REQD at this point. I experimented with 'USE.*GCC.*' some time ago and at the time these variables did not do what I was after.Jason Bacon <outpaddling%yahoo.com@localhost> writes:Can you try bootstrapping a tree on NetBSD 5 with the attached script? I used it on NetBSD 7.1, choosing gcc7 when prompted, and re2c built fine for me.Thanks, I will give that a try. Can you explain how this is supposed to work in terms of the variables I quoted? I don't see them in your scripts at first glance.
My suggestion to use auto-pkgsrc-setup was more to establish a working baseline from which we can begin tweaking other variables and see what breaks it. I'm curious to see if auto-pkgsrc-setup will work with such an old system as well. In theory, if the system can build the gcc package you select, it should work.
I think that's a given. It will depend on gcc version and compiler options, of course. E.g., gcc7 + -march=native on recent hardware will almost certainly generate instructions the NetBSD 5 native "as" is unaware of. Then you'll need to force a newer binutils.There are some pitfalls involved with using a pkgsrc gcc as a minimum compiler and auto-pkgsrc-setup knows how to step around them. See the attached mk.conf generated by the script. The massive exception list for gcc dependencies is due largely to the python dep in gcc8, which almost double the number of dependencies over gcc7. Your errors don't seem to indicate that this is the problem, but you also have to watch out for old binutils installations that can't handle instructions generated by newer gcc code generators. See the hack for RHEL at the end of my mk.conf.So perhaps the native netbsd-5 binutils have this issue?
Cheers, JB