tech-pkg archive

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

Re: Cross-compilation problems


On Fri, Jul 05, 2019 at 08:51:59PM -0400, Greg Troxel wrote:
> writes:
> > When trying to create the first needed package: cross-libtool-base,
> > the configure script chokes because it is unable to create an
> > executable.
> >
> > Indeed, the cross-compiler is invoked with --sysroot=/ and this prevents
> > it from finding the crt0.o etc. to link the executable with.
> >
> > So I force it by adding in the Makefile:
> >
> > CFLAGS+= --sysroot=${CROSS_DESTDIR}
> (I have never actually done cross pkgsrc, but it has long been on my
> Copious Spare Time todo list.)
> Where are you getting your cross toolchain from?  My impression is that
> the cross tools NetBSD builds as part of the full release build have
> sysroot baked in to the destdir.   So rather than adding it to CFLAGS,
> I'd want to find out what is going awry with the intended plan, because
> fairly obviously (but perhaps incorrectly) it seems that the cross
> support is already expecting to deal with what it needs to.

I don't think so since you can build the tools before building the
release so the tools have to be agnostic about the releasedir.

For what I understood from a cursory look to the makefiles, during the
builds the object files (crt0.o, crtbegin.o, crtend.o, crti.o) are
spefically named with macros in with LIBCRT0 etc.

But the cross linker has a sysroot set to '/'.

Best regards,
        Thierry Laronde <tlaronde +AT+ polynum +dot+ com>
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C

Home | Main Index | Thread Index | Old Index