On 10/6/18 12:22 PM, Mark Millard via freebsd-toolchain wrote:
> [Actually devel/gettext-tools is a build time dependency: it should not be 
> using
> libtool: link: /usr/local/bin/powerpc64-unknown-freebsd12.0-gcc --sysroot=. . 
> .
> It looks like the /usr/local/lib references are correct but the wrong linker 
> was
> being used. About 5 other ports have a similar status for making base/binutils
> as a cross build.]

base/binutils should not be pulling in any other ports at all.  Everytime I've
built it it has had no other dependencies beyond pkg.  As far as I'm aware, 
the only ports which work with CROSS_TOOLCHAIN and CROSS_SYSROOT are
ports-mgmt/pkg, base/gcc, and base/binutils.

> On 2018-Oct-5, at 11:00 PM, Mark Millard <marklmi at yahoo.com> wrote:
> 
>> In trying to follow the base/binutils part of 
>> https://wiki.freebsd.org/ExternalGCC
>> (or /usr/ports/base/README) for targeting powerpc64 I got:
>>
>> ( My /etc/make.conf has: WRKDIRPREFIX?=/wrkdirs .)
>>
>> # cd ../../base/binutils/
>> # make CROSS_TOOLCHAIN=powerpc64-gcc 
>> CROSS_SYSROOT=/usr/obj/DESTDIRs/xtcgcc-powerpc64-installworld package
>> . . .
> 
> Note: This should involve building devel/gettext-tools targetting amd64
> (the host environment in this example) because devel/gettext-tools is
> a build-time dependency, not to be run on the target system.

Maybe install gettext on your system first before doing the build.  Probably
the CROSS_* aren't stripped from the environment when building dependencies.

> May be if devel/gettext-tools had been pre-built and installed
> before trying the CROSS_TOOLCHAIN=powerpc64-gcc
> CROSS_SYSROOT=/usr/obj/DESTDIRs/xtcgcc-powerpc64-installworld
> based build activity it would have been okay?
> 
> [I try such later below and report on the results.]
> 
> There are no words on https://wiki.freebsd.org/ExternalGCC or
> in /usr/ports/base/README for such special build-sequence
> instructions.

You're maybe the 3rd person trying it. :-/

>> (It is also unclear how the process involving base/* mixes with doing
>> later FreeBSD updates from source --including any use of a delete-old
>> step if WITHOUT_BINUTILS= is used at the time. For the cross buildworld
>> itself it is not clear what options are intended.)

So I plan on having a freebsd-gcc.mk (or freebsd-cc.mk) toolchain file
that base/gcc will install that will set WITHOUT_BINUTILS and some other
things.  I have manually done that for now when building world inside a
MIPS qemu instance using base/binutils and base/gcc as the native toolchain.
Once I have a build that actually finishes I plan to add the toolchain to
the port and then have Makefile.inc1 automatically include the file it is
present.

>> Notes about some typos on: https://wiki.freebsd.org/ExternalGCC
>>
>> /usr/ports/devel/ports-mgmt/pkg should be:
>> /usr/ports/ports-mgmt/pkg
>>
>> 3 examples of CROSS_TOOCLAHIN should be:
>> CROSS_TOOLCHAIN

Fixed.

>> Notes about the /usr/ports/base/README :
>>
>> No mention is made of the pkg build so that it can be
>> set up on the target. Only https://wiki.freebsd.org/ExternalGCC
>> has that information. /usr/ports/base/README does not
>> reference https://wiki.freebsd.org/ExternalGCC either.

The README predates the wiki page by a fair bit.

The current known issue I need to get back to with base/gcc is that it
improperly looks for libraries in /usr/lib when --sysroot is used.  I need
to get that fixed so that a buildworld via base/gcc works correctly and then
I will probably get back to working on more of the todo items on the wiki
page.

-- 
John Baldwin

                                                                            
_______________________________________________
freebsd-toolchain@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-toolchain
To unsubscribe, send any mail to "freebsd-toolchain-unsubscr...@freebsd.org"

Reply via email to