Subject: MIPS new-toolchain and crunchide
To: None <port-mips@netbsd.org>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: port-mips
Date: 01/22/2002 23:08:57
Does anyone try to build crunched binary on mips with new-toolchain?
On my newsmips, building ramdisk binary fails with following error:

---
all ===> ramdisk
 :
make -f ramdiskbin.mk all
/usr/src/tools/obj.newsmips/tools.NetBSD-1.5ZA-mipseb/bin/mipseb--netbsd-gcc \
-Os   -Werror  -nostdinc -isystem /usr/include  -c ramdiskbin.c
echo "int _crunched_cat_stub(int argc, char **argv, char **envp){return \
main(argc,argv,envp);}" >cat_stub.c
/usr/src/tools/obj.newsmips/tools.NetBSD-1.5ZA-mipseb/bin/mipseb--netbsd-gcc \
-Os   -Werror  -nostdinc -isystem /usr/include  -c cat_stub.c
/usr/src/tools/obj.newsmips/tools.NetBSD-1.5ZA-mipseb/bin/mipseb--netbsd-ld \
-dc -r -o cat.cro cat_stub.o cat/cat.o
/usr/src/tools/obj.newsmips/tools.NetBSD-1.5ZA-mipseb/bin/mipseb--netbsd-objcopy \
--keep-global-symbol _crunched_cat_stub cat.cro
 :
/usr/src/tools/obj.newsmips/tools.NetBSD-1.5ZA-mipseb/bin/mipseb--netbsd-gcc \
 -static -o ramdiskbin -nostdlib  /usr/lib/crt0.o /usr/lib/crtbegin.o \
ramdiskbin.o cat.cro chmod.cro chown.cro chroot.cro cp.cro dd.cro df.cro \
disklabel.cro dmesg.cro ed.cro fsck.cro fsck_ffs.cro ftp.cro gzip.cro \
ifconfig.cro init.cro installboot.cro ln.cro ls.cro mkdir.cro mknod.cro \
more.cro mount.cro mount_cd9660.cro mount_ffs.cro mount_msdos.cro \
mount_nfs.cro mv.cro newfs.cro pax.cro ping.cro pwd.cro rcmd.cro \
reboot.cro restore.cro rm.cro route.cro sed.cro sh.cro shutdown.cro \
stty.cro sync.cro test.cro tset.cro umount.cro  libhack.o -ledit -lutil \
-lcurses -ltermcap -lcrypt -ll -lm -lz -L/usr/lib  -lgcc -lc -lgcc \
/usr/lib/crtend.o
/usr/src/tools/obj.newsmips/tools.NetBSD-1.5ZA-mipseb/mipseb--netbsd/bin/ld: \
cat.cro: CALL16 reloc at 0x1c not against global symbol
cat.cro: could not read symbols: Bad value
collect2: ld returned 1 exit status
*** Error code 1

Stop.
make: stopped in /usr/src/distrib/newsmips/floppies/ramdisk/obj.newsmips
*** Error code 1

---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp