On Sun, Jul 04, 2004 at 09:14:57PM +0800, Richard Chan wrote:
In building a x86->Sparc32,64 cross I encountered the situation where
xgcc is not using
the multi-os-directory when building libgcc_s.so.1. This results in
finding the wrong target
crt*.o files (32-bit) when trying to build 64-bit libgcc_s.so.1.
Problem description
Building an x86->Sparc32,64 cross using
configure
--prefix=/opt/sparctools --target=sparc64-unknown-linux-gnu
--enable-threads=posix --enable-__cxa_atexit --disable-libunwind-exceptions
--disable-optimization --with-system-zlib
The target files (necessary for pthread.h, libc.so etc) have been copied
over
from a live system:
32-bit files in <prefix>/<target>/lib
64-bit files in<prefix>/<target>lib64
System headers in <prefix>/<target>/sys-include
You're using a multi-OS directory, so you need to put them where GCC
will expect OS directories. It won't use the OS libdir suffix for
<target>/lib.
Try this instead:
Add --with-sysroot=/opt/sparctools/sys-root
32-bit files in <prefix>/sys-root/usr/lib
64-bit files in <prefix>/sys-root/usr/lib64
System headers in <prefix>/sys-root/usr/include
I assume you're using 3.4, by the way.