[llvm-commits] [llvm] r55557 - in /llvm/trunk: Makefile.config.in Makefile.rules autoconf/configure.ac autoconf/m4/visibility_inlines_hidden.m4 configure

Matthijs Kooijman matthijs at stdin.nl
Tue Sep 2 14:40:01 PDT 2008


Hi Daniel,

I think this is really a compiler bug. I'm not completely sure what
-fvisibility-inlines-hidden is supposed to do, but it also breaks with the
following trivial twoliner:

matthijs at xanthe:~$ cat test.cpp 
#include <string>
std::string foo;
matthijs at xanthe:~$ g++-4.1 test.cpp  -fvisibility-inlines-hidden
/usr/lib/gcc/x86_64-linux-gnu/4.1.3/../../../../lib/crt1.o: In function
`_start':
(.text+0x20): undefined reference to `main'
/tmp/ccvMMK6h.o: In function `__tcf_0':
test.cpp:(.text+0x12): undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string()'
/tmp/ccvMMK6h.o: In function `__static_initialization_and_destruction_0(int,
int)':
test.cpp:(.text+0x3b): undefined reference to `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::basic_string()'
/usr/bin/ld: a.out: hidden symbol `std::basic_string<char,
std::char_traits<char>, std::allocator<char> >::~basic_string()' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status

(disregarding the undefined main error).

I'm wondering if this is Debian/Ubuntu specific, or also happens using
upstream gcc versions.

Gr.

Matthijs
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20080902/f999fd5b/attachment.sig>


More information about the llvm-commits mailing list