Hi,
There are ~100 failures on each *-rtems* target
in the latest test runs when various lto related
flags are on. The symbols in questions are in the
RTEMS libraries which are picked up via the
-B... argument. Other symbols from the same
library are resolved.
Should LTO work with a target not using gold?
The errors are like this:
Executing on host: /users/joel/test-gcc/b-gcc1-m32r/gcc/xgcc
-B/users/joel/test-gcc/b-gcc1-m32r/gcc/
/users/joel/test-gcc/gcc-svn/gcc/testsuite/gcc.c-torture/execute/builtins/fprintf.c
/users/joel/test-gcc/gcc-svn/gcc/testsuite/gcc.c-torture/execute/builtins/fprintf-lib.c
/users/joel/test-gcc/gcc-svn/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c
gcc_tg.o -w -O2 -flto -flto-partition=none -DSTACK_SIZE=2048
-isystem
/users/joel/test-gcc/b-gcc1-m32r/m32r-rtems4.11/./newlib/targ-include
-isystem /users/joel/test-gcc/gcc-svn/newlib/libc/include
-B/users/joel/test-gcc/install-svn/m32r-rtems4.11/m32rsim/lib/ -specs
bsp_specs -qrtems
-B/users/joel/test-gcc/b-gcc1-m32r/m32r-rtems4.11/./newlib/
-L/users/joel/test-gcc/b-gcc1-m32r/m32r-rtems4.11/./newlib
/users/joel/test-gcc/b-gcc1-m32r/rtems_gcc_main.o -Wl,-wrap,exit
-Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort -lm -o
/users/joel/test-gcc/b-gcc1-m32r/gcc/testsuite/gcc/fprintf.x6
(timeout = 300)
/users/joel/test-gcc/b-gcc1-m32r/m32r-rtems4.11/./newlib/libc.a(lib_a-fvwrite.o):
In function `__sfvwrite_r':^M
/users/joel/test-gcc/gcc-svn/newlib/libc/stdio/fvwrite.c:158: undefined
reference to `_realloc_r'^M
/users/joel/test-gcc/b-gcc1-m32r/m32r-rtems4.11/./newlib/libc.a(lib_a-makebuf.o):
In function `__smakebuf_r':^M
/users/joel/test-gcc/gcc-svn/newlib/libc/stdio/makebuf.c:59: undefined
reference to `_fstat_r'^M
/users/joel/test-gcc/gcc-svn/newlib/libc/stdio/makebuf.c:110: undefined
reference to `_isatty_r'^M
/users/joel/test-gcc/b-gcc1-m32r/m32r-rtems4.11/./newlib/libc.a(lib_a-mprec.o):
In function `_Balloc':^M
/users/joel/test-gcc/gcc-svn/newlib/libc/stdlib/mprec.c:106: undefined
reference to `_calloc_r'^M
/users/joel/test-gcc/gcc-svn/newlib/libc/stdlib/mprec.c:123: undefined
reference to `_calloc_r'^M
collect2: ld returned 1 exit status^M
compiler exited with status 1
output is:
/users/joel/test-gcc/b-gcc1-m32r/m32r-rtems4.11/./newlib/libc.a(lib_a-fvwrite.o):
In function `__sfvwrite_r':^M
/users/joel/test-gcc/gcc-svn/newlib/libc/stdio/fvwrite.c:158: undefined
reference to `_realloc_r'^M
/users/joel/test-gcc/b-gcc1-m32r/m32r-rtems4.11/./newlib/libc.a(lib_a-makebuf.o):
In function `__smakebuf_r':^M
/users/joel/test-gcc/gcc-svn/newlib/libc/stdio/makebuf.c:59: undefined
reference to `_fstat_r'^M
/users/joel/test-gcc/gcc-svn/newlib/libc/stdio/makebuf.c:110: undefined
reference to `_isatty_r'^M
/users/joel/test-gcc/b-gcc1-m32r/m32r-rtems4.11/./newlib/libc.a(lib_a-mprec.o):
In function `_Balloc':^M
/users/joel/test-gcc/gcc-svn/newlib/libc/stdlib/mprec.c:106: undefined
reference to `_calloc_r'^M
/users/joel/test-gcc/gcc-svn/newlib/libc/stdlib/mprec.c:123: undefined
reference to `_calloc_r'^M
collect2: ld returned 1 exit status^M
FAIL: gcc.c-torture/execute/builtins/fprintf.c compilation, -O2 -flto
-flto-partition=none
Explanations and advice are appreciated.
Thanks.
--joel