Building NetBSD/sh3 soruce tree with stack protector enabled fails with /usr/nb-ssp/tools/bin/shle--netbsdelf-gcc -O -Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-traditional -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wextra -Wno-unused-parameter -std=gnu99 -Werror -fstack-protector -Wstack-protector --param ssp-buffer-size=1 -D_LIBC -DLIBC_SCCS -DSYSLIBC_SCCS -D_REENTRANT -DHESIOD -DINET6 -DNLS -DYP -I/usr/src/lib/libc/include -I/usr/src/lib/libc -DSOFTFLOAT -I/usr/src/lib/libc/arch/sh3/softfloat -I/usr/src/lib/libc/softfloat -DSOFTFLOAT_FOR_GCC -I/usr/src/sys -I/usr/src/lib/libc/compat/stdlib -I/usr/src/lib/libc/compat/../stdlib -I/usr/src/lib/libc/../../common/lib/libc/quad -I/usr/src/lib/libc/../../common/lib/libc/string -I/usr/src/lib/libc/../../common/lib/libc/arch/sh3/string -D__DBINTERFACE_PRIVATE -DI18NMODULE_MAJOR=4 -DCITRUS -I/usr/src/libexec/ld.elf_so -I/usr/src/lib/libc/dlfcn -I/usr/src/lib/libc/gdtoa -DNO_FENV_H -I/usr/src/lib/libc/arch/sh3/gdtoa -DCITRUS_ICONV -DWITH_RUNE -I/usr/src/lib/libc -DPOSIX_MISTAKE -DCOMPAT__RES -DUSE_POLL -DPORTMAP -DWIDE_DOUBLE -DALL_STATE -DUSG_COMPAT -nostdinc -isystem /usr/nb-ssp/distrib/landisk/usr/include -c -D_I18N_DYNAMIC -fPIC -DPIC /usr/src/lib/libc/stdio/asprintf.c -o asprintf.so
/usr/src/lib/libc/stdio/asprintf.c: In function '_asprintf': /usr/src/lib/libc/stdio/asprintf.c:85: error: unable to find a register to spill in class 'R0_REGS' /usr/src/lib/libc/stdio/asprintf.c:85: error: this is the insn: (insn 191 211 210 7 (set (reg/f:SI 2 r2 [246]) (mem/u/c:SI (plus:SI (reg:SI 12 r12) (reg/f:SI 1 r1 [247])) [0 S4 A32])) 171 {movsi_i} (insn_list:REG_DEP_TRUE 189 (nil)) (expr_list:REG_DEAD (reg/f:SI 1 r1 [247]) (expr_list:REG_EQUIV (symbol_ref:SI ("__stack_chk_guard") [flags 0x40] <var_decl 0xbb93de40 __stack_chk_guard>) (nil)))) /usr/src/lib/libc/stdio/asprintf.c:85: confused by earlier errors, bailing out The compiler is gcc 4.1.2 as imported into the NetBSD tree: shle--netbsdelf-gcc (GCC) 4.1.2 20070110 (prerelease) (NetBSD nb1 20070110) -- Summary: Compiling with stack protector causes reigster spill failure Product: gcc Version: 4.1.2 Status: UNCONFIRMED Severity: minor Priority: P3 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: uwe at netbsd dot org GCC build triplet: i386--netbsdelf GCC host triplet: i386--netbsdelf GCC target triplet: sh3--netbsdelf http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32163