This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Weak changes cause arm/NetBSD bootstrap failure.



Richard,

This change,

2002-03-14  Richard Henderson  <rth@redhat.com>

	...
	* varasm.c
	...
	(asm_emit_uninitialised): Call globalize_decl for weak commons.

is breaking a bootstrap on ARM/NetBSD.  Specifically, it's causing the 
assembler to die with the message:

/work/rearnsha/gnu/egcs/gcc/xgcc -shared-libgcc -B/work/rearnsha/gnu/egcs/g
cc/ -nostdinc++ -L/work/rearnsha/gnu/egcs/arm-netbsd/libstdc++-v3/src 
-L/work/rearnsha/gnu/egcs/arm-netbsd/libstdc++-v3/src/.libs 
-B/work/rearnsha/gnu/install/arm-netbsd/bin/ -B/work/rearnsha/gnu/install/a
rm-netbsd/lib/ -isystem /work/rearnsha/gnu/install/arm-netbsd/include 
-nostdinc++ -I/work/rearnsha/gnu/egcs/arm-netbsd/libstdc++-v3/include/arm-n
etbsd -I/work/rearnsha/gnu/egcs/arm-netbsd/libstdc++-v3/include 
-I/work/rearnsha/gnusrc/egcs/libstdc++-v3/libsupc++ 
-I/work/rearnsha/gnusrc/egcs/libstdc++-v3/libmath -g -O2 
-fno-implicit-templates -Wall -Wno-format -W -Wwrite-strings -Winline 
-fdiagnostics-show-location=once -g -c /work/rearnsha/gnusrc/egcs/libstdc++
-v3/src/globals.cc  -fPIC -DPIC -o .libs/globals.o
/tmp/ccngtKGq.s: Assembler messages:
/tmp/ccngtKGq.s:1246: Error: Symbol `__ZNSt17_Swap_lock_structILi0EE12_S_sw
ap_lockE' can not be both weak and common
gnumake: *** [globals.lo] Error 1

And indeed, we have generated the following assembly code:

        .globl  __ZNSt17_Swap_lock_structILi0EE12_S_swap_lockE
        .weak   __ZNSt17_Swap_lock_structILi0EE12_S_swap_lockE
        .comm   __ZNSt17_Swap_lock_structILi0EE12_S_swap_lockE, 4       @ 4
 
How can a common symbol, which by definition is just a tentative 
allocation of space if there is no initialized alternative, be made weak?

R.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]