Subject: toolchain/23522: Cannot build libgcc3 on hp300 port
To: None <>
From: None <>
List: netbsd-bugs
Date: 11/21/2003 17:24:07
>Number:         23522
>Category:       toolchain
>Synopsis:       Cannot build libgcc3 on hp300 port
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Nov 21 16:25:00 UTC 2003
>Originator:     Jarle Greipsland
>Release:        NetBSD 1.6ZC
System: NetBSD 1.6ZC NetBSD 1.6ZC (DENNIS) #6: Fri Oct 3 14:21:27 CEST 2003 hp300
Architecture: m68k
Machine: hp300

I have just tried to build a hp300 distribution set natively on a
hp433 system, but the build process fails.

The new -current sources are from around November 16th, and the
existing system is running binaries build from -current sources of
early October vintage.

Prior to invoking the build script, I cleaned out all contents of the
DESTDIR, OBJDIR and TOOLDIR directories.  I then ran:

# ./ -D /usr/dest -T /usr/tools -O /usr/obj tools

which succeeded.  Followed by:

# ./ -D /usr/dest -T /usr/tools -O /usr/obj distribution

which failed.

===> command: ./ -D /usr/dest -T /usr/tools -O /usr/obj distribution
===> started: Thu Nov 20 21:38:40 CET 2003
===> MACHINE:          hp300
===> MACHINE_ARCH:     m68k
===> TOOLDIR path:     /usr/tools
===> DESTDIR path:     /usr/dest
===> RELEASEDIR path:  /usr/obj/releasedir
===> makewrapper:      /usr/tools/bin/nbmake-hp300
===> Updated /usr/tools/bin/nbmake-hp300
(cd /usr/src && /usr/tools/bin/nbmake NOPOSTINSTALL=1 build)
[ ... ]
#   compile  _bb.o
/usr/tools/bin/m68k--netbsdelf-gcc -O2  -Werror    -I/usr/src/gnu/lib/libgcc3 -I/usr/src/gnu/usr.bin/gcc3/arch/m68k -DIN_GCC -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I/usr/src/gnu/dist/gcc/gcc -I/usr/src/gnu/dist/gcc/gcc/. -I/usr/src/gnu/dist/gcc/gcc/config -I/usr/src/gnu/dist/gcc/gcc/../include -I/usr/src/gnu/dist/gcc/gcc/cp -I/usr/src/gnu/lib/libstdc++-v3/arch/m68k -I.   -nostdinc -isystem /usr/dest/usr/include -c    _bb.c -o _bb.o.tmp
In file included from _bb.c:2:
/usr/src/gnu/dist/gcc/gcc/libgcc2.c: In function `__bb_exit_func':
/usr/src/gnu/dist/gcc/gcc/libgcc2.c:1542: error: unable to find a register to spill in class `DATA_REGS'
/usr/src/gnu/dist/gcc/gcc/libgcc2.c:1542: error: this is the insn:
(insn:QI 197 196 198 17 0x10430120 (set (cc0)
        (compare (mem:SI (reg:SI 8 %a0 [65]) [2 S4 A32])
            (const_int 4 [0x4]))) 11 {*} (insn_list 195 (nil))
    (expr_list:REG_DEAD (reg:SI 8 %a0 [65])
/usr/src/gnu/dist/gcc/gcc/libgcc2.c:1542: confused by earlier errors, bailing out

*** Failed target:  _bb.o
*** Failed command: /usr/tools/bin/m68k--netbsdelf-gcc -O2 -Werror -I/usr/src/gnu/lib/libgcc3 -I/usr/src/gnu/usr.bin/gcc3/arch/m68k -DIN_GCC -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -I/usr/src/gnu/dist/gcc/gcc -I/usr/src/gnu/dist/gcc/gcc/. -I/usr/src/gnu/dist/gcc/gcc/config -I/usr/src/gnu/dist/gcc/gcc/../include -I/usr/src/gnu/dist/gcc/gcc/cp -I/usr/src/gnu/lib/libstdc++-v3/arch/m68k -I. -nostdinc -isystem /usr/dest/usr/include -c _bb.c -o _bb.o.tmp
*** Error code 1

nbmake: stopped in /usr/src/gnu/lib/libgcc3

*** Failed target:  dependall
*** Failed command: cd /usr/src/gnu/lib/libgcc3; /usr/tools/bin/nbmake realall
*** Error code 1

nbmake: stopped in /usr/src/gnu/lib/libgcc3

Try and build the system on a hp300 system.