public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "qiu.chaofan at outlook dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/100912] powerpc64le: ieee128 long double incorrectly printed when using shared libstdc++ Date: Mon, 11 Oct 2021 10:08:24 +0000 [thread overview] Message-ID: <bug-100912-4-yMh0lrtbAm@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-100912-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100912 Qiu Chaofan <qiu.chaofan at outlook dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |qiu.chaofan at outlook dot com --- Comment #5 from Qiu Chaofan <qiu.chaofan at outlook dot com> --- Hi, I encountered the same problem when dynamically linking against libstdcxx, while static linking works fine. The HEAD of git history is 8f323c712 (early Sep.) so it shouldn't be old. The configure option is: --enable-languages=c,c++ --disable-nls --disable-bootstrap --with-long-double-format=ieee --disable-libgomp --enable-multilib --with-cpu=power9 --with-advance-toolchain=at15.0 (Disabling multilib still has this issue) By digging into make log, I found something interesting (some omitted): libtool: link: /build/./gcc/xgcc -shared-libgcc ... -fPIC -DPIC -D_GLIBCXX_SHARED -shared -nostdlib /opt/at15.0/lib/../lib64/crti.o /build/./gcc/crtbeginS.o .libs/compatibility.o .libs/compatibility-debug_list.o .libs/compatibility-debug_list-2.o .libs/compatibility-ldbl.o .libs/compatibility-c++0x.o .libs/compatibility-atomic-c++0x.o .libs/compatibility-thread-c++0x.o .libs/compatibility-chrono.o .libs/compatibility-condvar.o .libs/compatibility-ldbl-alt128.o .libs/compatibility-ldbl-alt128-cxx11.o -Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a ../src/c++98/.libs/libc++98convenience.a ../src/c++11/.libs/libc++11convenience.a ../src/c++17/.libs/libc++17convenience.a ../src/c++20/.libs/libc++20convenience.a ... -Wl,-soname -Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.29 Only the 'compatibility' objects joined the link, and they're built using `-mabi=ibmlongdouble`, not IEEE. Manually adding `c++11/wlocale-inst.o` produces error complaining about multiple definition. While libstdc++.a contains all of these definitions, actually seven (compatibility-ldbl.o compatibility-ldbl-alt128.o compatibility-ldbl-alt128-cxx11.o cxx11-locale-inst.o cxx11-wlocale-inst.o locale-inst.o wlocale-inst.o ), so ld can find the correct one properly. (although I'm still not clear how ld does it) If I understood correctly, the reason why result is incorrect is that the `libstdc++.so` only contains symbols built for compatibility. Maybe something went wrong in the build scripts?
next prev parent reply other threads:[~2021-10-11 10:08 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-04 18:51 [Bug libstdc++/100912] New: " msc at linux dot ibm.com 2021-06-04 22:27 ` [Bug target/100912] " pinskia at gcc dot gnu.org 2021-06-05 10:51 ` redi at gcc dot gnu.org 2021-06-07 13:27 ` msc at linux dot ibm.com 2021-06-07 13:50 ` msc at linux dot ibm.com 2021-10-11 10:08 ` qiu.chaofan at outlook dot com [this message] 2021-10-13 8:56 ` [Bug libstdc++/100912] " qiu.chaofan at outlook dot com 2021-10-13 9:16 ` redi at gcc dot gnu.org 2021-10-21 3:47 ` qiu.chaofan at outlook dot com 2021-12-06 6:26 ` qiu.chaofan at outlook dot com 2022-01-10 9:57 ` qiu.chaofan at outlook dot com 2022-01-10 10:01 ` redi at gcc dot gnu.org 2022-02-14 17:27 ` cvs-commit at gcc dot gnu.org 2022-02-14 17:29 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-100912-4-yMh0lrtbAm@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).