Subject: Cross-compiling on Linux Suse for Sparc
To: None <tech-toolchain@netbsd.org>
From: Marc DILASSER <marc.dilasser@free.fr>
List: tech-toolchain
Date: 08/04/2003 12:00:13
Host machine Toshiba Satellite Pro 4300, arch i386
SuSE Linux 8.1,
Target machine : Sun Station 5 170 Mhz, arch sparc
./build.sh -m sparc -T /usr/cross tools :
------------------------------------------------------------
First problem :
/opt/netbsd_sys/src/usr.bin/stat/stat.c: In function `format1':
/opt/netbsd_sys/src/usr.bin/stat/stat.c:667: structure has no member
named `st_atimespec'
/opt/netbsd_sys/src/usr.bin/stat/stat.c:671: structure has no member
named `st_mtimespec'
/opt/netbsd_sys/src/usr.bin/stat/stat.c:675: structure has no member
named `st_ctimespec'
*** Error code 1
Modified src/usr.bin/stat.c,
diff --normal stat.c stat.c.original
667c667
< /* tsp = &st->st_atimespec; */
---
> tsp = &st->st_atimespec;
670,671c670,671
< /* if (tsp == NULL)
< tsp = &st->st_mtimespec; */
---
> if (tsp == NULL)
> tsp = &st->st_mtimespec;
674,675c674,675
< /* if (tsp == NULL)
< tsp = &st->st_ctimespec; */
---
> if (tsp == NULL)
> tsp = &st->st_ctimespec;
------------------------------------------------------------
Second problem, seems to be Suse specific :
/usr/lib/gcc-lib/i486-suse-linux/3.2/../../../../i486-suse-linux/bin/ld:
cannot find -ltermcap
collect2: ld returned 1 exit status
*** Error code 1
corrected by
cp /usr/lib/termcap/libtermcap.a /usr/lib
------------------------------------------------------------
Third problem :
/usr/cross/bin/nbconfig STATION5
../../../../opencrypto/files.opencrypto:15: duplicate file
crypto/sha2/sha2.c
../../../../crypto/sha2/files.sha2:5: here is the original definition
*** Stop.
Removed line 15 from opencrypto/files.opencrypto
The kernel works.
Marc