Hi,
I'm running into problems with the gcc-4.9.1 m32c-elf target. While
trying to build newlib-2.1, multiple source files are generating "error:
unable to find a register to spill in class 'A_REGS'".
Here's how I built the tools. The host system is CentOS 6.5 x86_64.
$ uname -a
Linux lion.seitzassoc.com 2.6.32-431.20.5.el6.x86_64 #1 SMP Fri Jul 25
08:34:44 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for x86_64-redhat-linux-gnu
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
cd binutils-m32c/
../binutils-2.24/configure --prefix=/usr/local/m32c --target=m32c-elf
make -j9
sudo make install
cd ../gcc-m32c/
../gcc-4.9.1/configure --prefix=/usr/local/m32c --target=m32c-elf
--enable-languages=c --with-newlib --with-checking=release
make -j9 all-host
sudo make install-host
cd ../newlib-m32c/
../newlib-2.1.0/configure --prefix=/usr/local/m32c --target=m32c-elf
make
The final make results in the following error:
m32c-elf-gcc -B/scratch/newlib-m32c/m32c-elf/m32cm/newlib/ -isystem
/scratch/newlib-m32c/m32c-elf/m32cm/newlib/targ-include -isystem
/scratch/newlib-2.1.0/newlib/libc/include
-B/scratch/newlib-m32c/m32c-elf/m32cm/libgloss/m32c
-L/scratch/newlib-m32c/m32c-elf/m32cm/libgloss/libnosys
-L/scratch/newlib-2.1.0/libgloss/m32c -mcpu=m32cm
-DPACKAGE_NAME=\"newlib\" -DPACKAGE_TARNAME=\"newlib\"
-DPACKAGE_VERSION=\"2.1.0\" -DPACKAGE_STRING=\"newlib\ 2.1.0\"
-DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -I.
-I../../../../../../newlib-2.1.0/newlib/libc/stdlib -Os
-DPREFER_SIZE_OVER_SPEED -DSMALL_MEMORY -DMISSING_SYSCALL_NAMES
-DABORT_PROVIDED -fno-builtin -g -O2 -mcpu=m32cm -c -o
lib_a-dtoa.o `test -f 'dtoa.c' || echo
'../../../../../../newlib-2.1.0/newlib/libc/stdlib/'`dtoa.c
../../../../../../newlib-2.1.0/newlib/libc/stdlib/dtoa.c: In function
'_dtoa_r':
../../../../../../newlib-2.1.0/newlib/libc/stdlib/dtoa.c:862:1: error:
unable to find a register to spill in class 'A_REGS'
}
^
../../../../../../newlib-2.1.0/newlib/libc/stdlib/dtoa.c:862:1: error:
this is the insn:
(insn 548 545 551 35 (set (reg:DI 366)
(mem/u/c:DI (plus:PSI (subreg:PSI (reg:SI 364) 0)
(symbol_ref:PSI ("__mprec_tens") [flags 0x40] <var_decl
0x7f899ad89ed8 __mprec_tens>)) [0 S8 A8]))
../../../../../../newlib-2.1.0/newlib/libc/stdlib/dtoa.c:364 100
{movdi_splittable}
(expr_list:REG_DEAD (reg:SI 364)
(nil)))
../../../../../../newlib-2.1.0/newlib/libc/stdlib/dtoa.c:862: confused
by earlier errors, bailing out
If I run 'make -k', I get the same error when the following files are
compiled:
newlib-2.1.0/newlib/libc/stdlib/dtoa.c
newlib-2.1.0/newlib/libc/stdlib/ldtoa.c
newlib-2.1.0/newlib/libc/stdlib/mprec.c
newlib-2.1.0/newlib/libc/stdlib/strtod.c
newlib-2.1.0/newlib/libc/stdlib/l64a.c
newlib-2.1.0/newlib/libc/stdlib/wctob.c
newlib-2.1.0/newlib/libc/stdio/vfwscanf.c
newlib-2.1.0/newlib/libc/stdio/vfscanf.c
newlib-2.1.0/newlib/libc/stdio/vfscanf.c
newlib-2.1.0/newlib/libc/stdio/vfscanf.c
newlib-2.1.0/newlib/libc/stdio/vfscanf.c
newlib-2.1.0/newlib/libc/stdio/vfwscanf.c
newlib-2.1.0/newlib/libc/stdio/vfwscanf.c
newlib-2.1.0/newlib/libc/stdio/vfwscanf.c
newlib-2.1.0/newlib/libc/string/strtok.c
newlib-2.1.0/newlib/libc/time/mktime.c
newlib-2.1.0/newlib/libc/time/mktm_r.c
newlib-2.1.0/newlib/libc/time/strftime.c
newlib-2.1.0/newlib/libc/time/strptime.c
newlib-2.1.0/newlib/libc/time/../time/strftime.c
newlib-2.1.0/newlib/libc/misc/__dprintf.c
newlib-2.1.0/newlib/libc/misc/init.c
newlib-2.1.0/newlib/libc/misc/fini.c
newlib-2.1.0/newlib/libm/math/k_rem_pio2.c
newlib-2.1.0/newlib/libm/math/e_exp.c
newlib-2.1.0/newlib/libm/math/e_pow.c
newlib-2.1.0/newlib/libm/math/s_atan.c
newlib-2.1.0/newlib/libm/math/kf_rem_pio2.c
newlib-2.1.0/newlib/libm/math/ef_exp.c
newlib-2.1.0/newlib/libm/math/ef_pow.c
newlib-2.1.0/newlib/libm/math/sf_atan.c
Should this work, or am I doing something wrong?
thanks,
galen
--
Galen Seitz
galens@xxxxxxxxxxxxxx