uClibc-0.9.29 compilation failed when trying to build with gcc-4.2.2 with the
following error:

---- CUT HERE ----
sh4-linux-uclibc-gcc -c ldso/ldso/ldso.c -o ldso/ldso/ldso.oS -include
./include/libc-symbols.h -Wall -Wstrict-prototypes -fno-strict-aliasing -Os
-pipe -funit-at-a-time -fhonour-copts -fno-stack-protector -fno-builtin
-nostdinc -I./include -I. -std=gnu99 -Os -funit-at-a-time
-fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce
-fstrict-aliasing -mprefergot
-I./libpthread/linuxthreads.old/sysdeps/unix/sysv/linux/sh
-I./libpthread/linuxthreads.old/sysdeps/sh
-I./libpthread/linuxthreads.old/sysdeps/unix/sysv/linux
-I./libpthread/linuxthreads.old/sysdeps/pthread -I./libpthread/linuxthreads.old
-I./libpthread
-I/store/sh4_3/trunk/build_dir/toolchain-sh4_gcc4.2.2/linux/include/ -isystem
/store/sh4_3/trunk/staging_dir/toolchain-sh4_gcc4.2.2/lib/gcc/sh4-linux-uclibc/4.2.2/include
-DNDEBUG -fPIC -DSHARED -DNOT_IN_libc -DIS_IN_rtld -fno-stack-protector
-fno-omit-frame-pointer -I./ldso/ldso/sh -I./ldso/include -I./ldso/ldso
-DUCLIBC_RUNTIME_PREFIX="/" -DUCLIBC_LDSO="ld-uClibc.so.0"
-DLDSO_ELFINTERP="sh/elfinterp.c"
In file included from ./libpthread/linuxthreads.old/sysdeps/sh/tls.h:23,
                 from ./include/bits/uClibc_errno.h:35,
                 from ./include/errno.h:62,
                 from ./include/bits/syscalls.h:16,
                 from ./include/sys/syscall.h:34,
                 from ./ldso/ldso/sh/dl-syscalls.h:3,
                 from ./ldso/include/dl-syscall.h:12,
                 from ./ldso/include/ldso.h:36,
                 from ldso/ldso/ldso.c:33:
./libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h:36: warning: C99 inline
functions are not supported; using GNU89
./libpthread/linuxthreads.old/sysdeps/sh/pt-machine.h:36: warning: to disable
this warning use -fgnu89-inline or the gnu_inline function attribute
ldso/ldso/dl-elf.c: In function '_dl_dprintf':
ldso/ldso/dl-elf.c:803: error: unable to find a register to spill in class
'R0_REGS'
ldso/ldso/dl-elf.c:803: error: this is the insn:
(insn 884 885 23 3 (set (reg/f:SI 1 r1 [221])
        (mem/u/c:SI (plus:SI (reg:SI 12 r12)
                (reg/f:SI 1 r1 [222])) [0 S4 A32])) 171 {movsi_ie} (nil)
    (expr_list:REG_DEAD (reg/f:SI 1 r1 [222])
        (expr_list:REG_EQUIV (symbol_ref:SI ("_dl_pagesize") <var_decl
0x2aaaab0d40b0 _dl_pagesize>)
            (nil))))
ldso/ldso/dl-elf.c:803: confused by earlier errors, bailing out
---- CUT HERE ----

uClibc developers pointed me here saying this is a known bug for the gcc-4.x
line, I was able to reproduce this bug on gcc-4.1.2 also.


GCC compilation options:
Configured with:
/store/sh4_3/trunk/build_dir/toolchain-sh4_gcc4.2.2/gcc-4.2.2/configure
--prefix=/store/sh4_3/trunk/staging_dir/toolchain-sh4_gcc4.2.2
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=sh4-linux-uclibc
--enable-languages=c --disable-shared
--with-sysroot=/store/sh4_3/trunk/build_dir/toolchain-sh4_gcc4.2.2/uClibc_dev/
--disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-nls
--disable-libmudflap --disable-multilib


-- 
           Summary: uClibc-0.9.29 compilation error for sh4 arch with gcc-
                    4.x
           Product: gcc
           Version: 4.2.2
            Status: UNCONFIRMED
          Severity: blocker
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: wigyori at uid0 dot hu
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: sh4-unknown-linux-uclibc


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34777

Reply via email to