This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug driver/17219] -static and -statig-libgcc aren't doing what they should.
- From: "gonnetp at inf dot ethz dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Aug 2004 17:21:33 -0000
- Subject: [Bug driver/17219] -static and -statig-libgcc aren't doing what they should.
- References: <20040828001516.17219.gonnetp@inf.ethz.ch>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From gonnetp at inf dot ethz dot ch 2004-08-30 17:21 -------
Subject: Re: -static and -statig-libgcc aren't doing what
they should.
As mentioned in the bug report, -static has the same non-effect... I
re-compiled with -static and -v and got:
f15 186> /usr/local/gcc/gcc-3.4.1/bin/g++ -v -static
-L/usr/local/gcc/gcc-3.4.1/lib/ test.cc
Reading specs from
/usr/local/gcc/gcc-3.4.1/lib/gcc/mips-sgi-irix6.5/3.4.1/specs
Configured with: ./configure --prefix=/usr/local/gcc/gcc-3.4.1 Thread
model: single gcc version 3.4.1
/usr/local/gcc/gcc-3.4.1/libexec/gcc/mips-sgi-irix6.5/3.4.1/cc1plus
-quiet -v test.cc -quiet -dumpbase test.cc -auxbase test -version -o
/scratch/jaffe/ccZVMzui.s ignoring nonexistent directory
"/usr/local/gcc/gcc-3.4.1/lib/gcc/mips-sgi-irix6.5/3.4.1/../../../../mips-sgi-irix6.5/include"
#include "..." search starts here: #include <...> search starts here:
/usr/local/gcc/gcc-3.4.1/lib/gcc/mips-sgi-irix6.5/3.4.1/../../../../include/c++/3.4.1
/usr/local/gcc/gcc-3.4.1/lib/gcc/mips-sgi-irix6.5/3.4.1/../../../../include/c++/3.4.1/mips-sgi-irix6.5
/usr/local/gcc/gcc-3.4.1/lib/gcc/mips-sgi-irix6.5/3.4.1/../../../../include/c++/3.4.1/backward
/usr/local/include
/usr/local/gcc/gcc-3.4.1/include
/usr/local/gcc/gcc-3.4.1/lib/gcc/mips-sgi-irix6.5/3.4.1/include
/usr/include
End of search list.
GNU C++ version 3.4.1 (mips-sgi-irix6.5)
compiled by GNU C version 3.4.1.
GGC heuristics: --param
ggc-min-expand=65 --param ggc-min-heapsize=65536
/usr/bin/as -EB -O0 -g0 -nocpp -show -G 0 -w -n32 -mips3 -o
/scratch/jaffe/ccSsyC2X.o /scratch/jaffe/ccZVMzui.s
/usr/bin/../../usr/lib32/cmplrs/as -DEFAULT:abi=n32:isa=mips4:proc=r10k
-EB -O0 -g0 -nocpp -show -G 0 -w -n32 -mips3 -o /scratch/jaffe/ccSsyC2X.o
/scratch/jaffe/ccZVMzui.s /usr/lib32/cmplrs/asm -t5_ll_sc_bug -pic2 -elf
-EB -O0 -g0 -G0 -w -mips3 -n32 /scratch/jaffe/ccZVMzui.s -o
/scratch/jaffe/ccSsyC2X.o
/usr/local/gcc/gcc-3.4.1/libexec/gcc/mips-sgi-irix6.5/3.4.1/collect2
-call_shared -no_unresolved -init __do_global_ctors -fini
__do_global_dtors -_SYSTYPE_SVR4 -woff 131 -n32 /usr/lib32/mips3/crt1.o
/usr/local/gcc/gcc-3.4.1/lib/gcc/mips-sgi-irix6.5/3.4.1/crtbegin.o
-L/usr/local/gcc/gcc-3.4.1/lib/
-L/usr/local/gcc/gcc-3.4.1/lib/gcc/mips-sgi-irix6.5/3.4.1 -L/usr/bin
-L/usr/local/gcc/gcc-3.4.1/lib/gcc/mips-sgi-irix6.5/3.4.1/../../..
/scratch/jaffe/ccSsyC2X.o -lstdc++ -lm -dont_warn_unused -lgcc -lgcc_eh
-warn_unused -L/usr/lib32/mips3 -L/usr/lib32 -dont_warn_unused -lc
-warn_unused -dont_warn_unused -lgcc -lgcc_eh -warn_unused
/usr/local/gcc/gcc-3.4.1/lib/gcc/mips-sgi-irix6.5/3.4.1/crtend.o
/usr/lib32/mips3/crtn.o
ld32: WARNING 127: Two shared objects with the
same soname, /usr/lib32/mips3/libm.so and /usr/lib32/libm.so, have been
been linked. This is probably due to a missing -L specification. Ignoring
the latter.
f15 187>
"collect2", which I assume then calls the linker, has an argument
"-call_shared" and nothing along the lines of "static"... Could it be that
g++ is calling the linker with the wrong arguments? Is there a way to
specifically see which arguments are passed to the linker?
Cheers and many thanks,
Pedro
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17219