This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
ARM bootstrap failure PR 46040 (Re: [PATCH] move DECLARE_LIBRARY_RENAMES to libgcc headers)
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: froydnj at codesourcery dot com (Nathan Froyd)
- Cc: gcc-patches at gcc dot gnu dot org, nickc at redhat dot com
- Date: Tue, 7 Dec 2010 20:14:45 +0100 (CET)
- Subject: ARM bootstrap failure PR 46040 (Re: [PATCH] move DECLARE_LIBRARY_RENAMES to libgcc headers)
Nathan Froyd wrote:
> (The intent is to move as much target library-specific stuff into libgcc
> first, then eventually move all the configuration hunks into libgcc's
> configury. Doing so should be straightforward, as the
> ../../libgcc/config/ paths stick out like sore thumbs. If other people
> have ideas on how the transition should go, I'm happy to hear them.)
It seems this patch broke bootstrap on ARM, causing PR 46040:
uweigand@localhost:~/gcc-head-build/armv7l-unknown-linux-gnueabi/libgcc$ /home/uweigand/gcc-head-build/./gcc/xgcc -B/home/uweigand/gcc-head-build/./gcc/ -B/home/uweigand/gcc-head-install/armv7l-unknown-linux-gnueabi/bin/ -B/home/uweigand/gcc-head-install/armv7l-unknown-linux-gnueabi/lib/ -isystem /home/uweigand/gcc-head-install/armv7l-unknown-linux-gnueabi/include -isystem /home/uweigand/gcc-head-install/armv7l-unknown-linux-gnueabi/sys-include -g -O2 -O2 -g -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc-head/gcc -I../../gcc-head/gcc/. -I../../gcc-head/gcc/../include -I../../gcc-head/gcc/../libcpp/include -I../../gcc-head/gcc/../libdecnumber -I../../gcc-head/gcc/../libdecnumber/dpd -I../libdecnumber -g0 -finhibit-size-directive -fno-inline -fno-exceptions -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize -fno-stack-protector -I. -I. -I../!
.././gcc -I../../../gcc-head/libgcc -I../../../gcc-head/libgcc/. -I../../../gcc-head/libgcc/../gcc -I../../../gcc-head/libgcc/../include -o crtbegin.o -MT crtbegin.o -MD -MP -MF crtbegin.dep -c ../../../gcc-head/libgcc/../gcc/crtstuff.c -DCRT_BEGIN
../../../gcc-head/libgcc/../gcc/crtstuff.c: In function "__do_global_dtors_aux":
../../../gcc-head/libgcc/../gcc/crtstuff.c:308:26: error: "__DTOR_LIST__" undeclared (first use in this function)
../../../gcc-head/libgcc/../gcc/crtstuff.c:308:26: note: each undeclared identifier is reported only once for each function it appears in
The problem is this change:
> case ${target} in
> arm*-*-linux-*eabi)
> tm_file="$tm_file arm/bpabi.h arm/linux-eabi.h"
> + tm_file="$tm_file ../../libgcc/config/arm/bpabi.h"
> tmake_file="$tmake_file arm/t-arm-elf arm/t-bpabi arm/t-linux-eabi t-slibgcc-libgcc"
> # Define multilib configuration for arm-linux-androideabi.
> case ${target} in
While compiling GCC itself, we're pulling in both files
gcc/config/arm/bpabi.h
libgcc/config/arm/bpapi.h
so everything works as before.
But if we're compiling libgcc, the relative path "arm/bpabi.h"
already refers to the file libgcc/config/arm/bpapi.h, so this
gets included twice, and gcc/config/arm/bpabi.h does not get
included at all any more.
However, there are certain defines in the latter file that also
influence libgcc, in particular those lines:
/* The BPABI specifies the use of .{init,fini}_array. Therefore, we
do not want GCC to put anything into the .{init,fini} sections. */
#undef INIT_SECTION_ASM_OP
#undef FINI_SECTION_ASM_OP
#define INIT_ARRAY_SECTION_ASM_OP ARM_EABI_CTORS_SECTION_OP
#define FINI_ARRAY_SECTION_ASM_OP ARM_EABI_DTORS_SECTION_OP
Since these are now no longer present, we're running into inconsistencies
while building the crt* startup files.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com