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]

weak linking on AIX 4.2, 4.3, any toolchain vs libstdc++-v3




Yo dude. I'm working on this AIX stuff, both with 

4.2 == benchmark == gcc-2.95.2
4.3 == bluey == /usr/clocal/bin
4.3 == bluey == /tantor/release-vault/aix43-000204/comp-tools/aix43-000204/H-\powerpc-ibm-aix4.3.3.0/bin

In all cases, there seems to be a problem with things that are weak
linking on ELF systems, but are something else on XCOFF. I'm talking
about static/const data members of templates here...probably not
something that you're testing as part of your gcc work, but something
that is necessary for c++ stuff to work...

Here's an example.

Take this file:

http://sourceware.cygnus.com/cgi-bin/cvsweb.cgi/libstdc%2b%2b/src/gen-num-limits.cc?rev=1.10&content-type=text/x-cvsweb-markup&cvsroot=libstdc%2b%2b

And remove the #include<c++config.h>. Try to compile like so:

g++ -nodefaultlibs -lgcc -lc gen-num-limits.cc 

You should see:

<bkoz@toto.cygnus.com> {/horton/bkoz/bld-aix43-libstdc++}                       % g++ -nodefaultlibs -lgcc -lc gen-num-limits.cc 
ld: 0711-317 ERROR: Undefined symbol: value<bool>::epsilon
ld: 0711-317 ERROR: Undefined symbol: value<bool>::round_error
ld: 0711-317 ERROR: Undefined symbol: value<char>::epsilon
ld: 0711-317 ERROR: Undefined symbol: value<char>::round_error
ld: 0711-317 ERROR: Undefined symbol: value<signed char>::epsilon
ld: 0711-317 ERROR: Undefined symbol: value<signed char>::round_error
ld: 0711-317 ERROR: Undefined symbol: value<unsigned char>::epsilon
ld: 0711-317 ERROR: Undefined symbol: value<unsigned char>::round_error
ld: 0711-317 ERROR: Undefined symbol: value<short>::epsilon
ld: 0711-317 ERROR: Undefined symbol: value<short>::round_error
ld: 0711-317 ERROR: Undefined symbol: value<unsigned short>::epsilon
ld: 0711-317 ERROR: Undefined symbol: value<unsigned short>::round_error
ld: 0711-317 ERROR: Undefined symbol: value<int>::epsilon
ld: 0711-317 ERROR: Undefined symbol: value<int>::round_error
ld: 0711-317 ERROR: Undefined symbol: value<unsigned int>::epsilon
ld: 0711-317 ERROR: Undefined symbol: value<unsigned int>::round_error
ld: 0711-317 ERROR: Undefined symbol: value<long>::epsilon
ld: 0711-317 ERROR: Undefined symbol: value<long>::round_error
ld: 0711-317 ERROR: Undefined symbol: value<unsigned long>::epsilon
ld: 0711-317 ERROR: Undefined symbol: value<unsigned long>::round_error
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status


These are all marked weak on x86/linux...

-benjamin

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