[LLVMbugs] [Bug 4277] New: llvm-gcc builds libstdc++ with symbols from libm
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed May 27 16:13:10 PDT 2009
http://llvm.org/bugs/show_bug.cgi?id=4277
Summary: llvm-gcc builds libstdc++ with symbols from libm
Product: new-bugs
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: new bugs
AssignedTo: unassignedbugs at nondot.org
ReportedBy: nlewycky at google.com
CC: rafael.espindola at gmail.com, llvmbugs at cs.uiuc.edu
On x86-64 linux, the built libstdc++ defines logf and does so badly:
~/llvm-gcc/install/lib64$ objdump -dr libstdc++.so
[...]
00000000000541e0 <logf at plt>:
541e0: ff 25 f2 f4 27 00 jmpq *0x27f4f2(%rip) # 2d36d8
<_GLOBAL_OFFSET_TABLE_+0x16f0>
541e6: 68 db 02 00 00 pushq $0x2db
541eb: e9 30 d2 ff ff jmpq 51420 <_init+0x18>
[...]
000000000009bb40 <logf>:
9bb40: 48 83 ec 08 sub $0x8,%rsp
9bb44: e8 97 86 fb ff callq 541e0 <logf at plt>
9bb49: 48 83 c4 08 add $0x8,%rsp
9bb4d: c3 retq
9bb4e: 66 90 xchg %ax,%ax
This causes any program that calls logf() and linked against the libstdc++
built by llvm-gcc to enter an infinite loop of calling itself.
All the other math symbols are there too (hypot, sinf, powl etc), which aren't
in my system libstdc++, and they also seem to have recursive definitions.
Here's the configure flags I passed to llvm-gcc configure to cause this:
--enable-checking --enable-llvm=/home/nlewycky/llvm --program-prefix=llvm-
--prefix=/home/nlewycky/llvm-gcc/install --target=x86_64-unknown-linux-gnu
--disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit
--enable-c99 --enable-long-long --with-gnu-as --with-gnu-ld --disable-multilib
--enable-shared=libgcc,libmudflap,libssp,libstdc++ --enable-languages=c,c++
--with-native-system-header-dir=/include --with-local-prefix=/
--enable-clocale=gnu
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list