tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Cross-compilation problems
tlaronde%polynum.com@localhost writes:
> On Fri, Jul 05, 2019 at 08:51:59PM -0400, Greg Troxel wrote:
>> tlaronde%polynum.com@localhost 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 bsd.prog.mk with LIBCRT0 etc.
>
> But the cross linker has a sysroot set to '/'.
Fair points. I guess it's that nbmake-foo passes down the right
arguments.
Still, it seems this pkgsrc cross mechanism was intended to do things
right, and it seems best to figure how what the intent was and how it
went wrong.
Home |
Main Index |
Thread Index |
Old Index