Subject: toolchain/32878: cannot cross build sparc64 from Solaris 10/amd64
To: None <,,>
From: None <>
List: netbsd-bugs
Date: 02/20/2006 05:00:01
>Number:         32878
>Category:       toolchain
>Synopsis:       cannot cross build sparc64 from Solaris 10/amd64
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 20 05:00:00 +0000 2006
>Originator:     Garrett D'Amore
>Release:        -current (3.99.15)
Tadpole Computer, Inc.
NetBSD 3.99.15 NetBSD 3.99.15 (GENERIC) #0: Sun Feb 19 06:15:56 UTC 2006 sparc64

Wanting to build an updated kernel and cross-compilation toolset, using on my Opteron server (running Solaris 10), I have errors, that I believe stem from the recent libc/kernel endianness tweaks:

./ -m sparc64 -T ${MYTOOLS} tools kernel=GENERIC

gives this error:

#   compile  compat/rmd160.lo
gcc -O  -I. -I./include -I/home/garrett/netbsd/src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1  -D_FILE_OFFSET_BITS=64 -D__DBINTERFACE_PRIVATE -c -o rmd160.lo.o    /home/garrett/netbsd/src/tools/compat/../../lib/libc/hash/rmd160/rmd160.c
/home/garrett/netbsd/src/tools/compat/../../lib/libc/hash/rmd160/rmd160.c:37:28: machine/endian.h: No such file or directory

*** Failed target:  rmd160.lo
*** Failed command: gcc -O -I. -I./include -I/home/garrett/netbsd/src/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D__DBINTERFACE_PRIVATE -c -o rmd160.lo.o /home/garrett/netbsd/src/tools/compat/../../lib/libc/hash/rmd160/rmd160.c
*** Error code 1

On a Solaris 10 machine, just try to bootstrap the tools.
Somehow, machine/endian.h needs to be a valid include location, so either arguments to the compiler, or a cross-compile environment where machine/endian.h is made to be sane.  Cross-compilation is *supposed* to work.  This will ultimately eventually become a show-stopper for me, as I have to use this system to cross compile for environments that cannot self-host (e.g. evbmips).