This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
make check failed for builtins testcases when lto enabled
- From: "Amker.Cheng" <amker dot cheng at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 25 Jun 2011 17:42:19 +0800
- Subject: make check failed for builtins testcases when lto enabled
Hi,
I noticed there are some builtins testcases failed in my "make
check-gcc" when lto enabled.
the command line like:
xgcc ...
.../gcc/testsuite/gcc.c-torture/execute/builtins/strlen.c
.../gcc/testsuite/gcc.c-torture/execute/builtins/strlen-lib.c
.../gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c
-w -O2
-flto -flto-partition=none
-lm -specs=rdimon.specs -lrdimon -lc -lg -lrdimon -mthumb -mcpu=cortex-m3
-o .../gcc/testsuite/gcc/strlen.x6
this failed testcase always complains:
/tmp/ccw8n1Wt.lto.o: In function `strlen':
ccYaDFzm.o:(.text+0x0): multiple definition of `strlen'
.../lib/gcc/arm-none-eabi/4.7.0/../../../../arm-none-eabi/lib/armv7-m/libc.a(lib_a-strlen.o):strlen.c:(.text+0x0):
first defined here
collect2: error: ld returned 1 exit status
There are a copy of strlen in c source file and a copy in libc.a.
Seems gcc/lto always link libc.a and find the library copy first,
which results in re-definition error.
So any suggestions? Thanks very much.
BTW, the testcase is ok without"-flto -flto-partition=none" specified.
--
Best Regards.