public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/101544] [OpenMP][AMDGCN][nvptx] C++ offloading: unresolved _Znwm = "operator new(unsigned long)" Date: Wed, 21 Jul 2021 09:33:28 +0000 [thread overview] Message-ID: <bug-101544-4-yvsA3hwtWj@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-101544-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101544 --- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Andrew Stubbs from comment #3) > C++ offloading works fine provided that there are no library calls or > exceptions. There's no reason std::pair, std::tuple, std::optional and types like that shouldn't work. Just making it possible to compile with -fno-rtti -fno-exceptions would be a start, and would avoid the need for exception handling. Libstdc++ headers already work fine with those options, and it should be possible to build the library itself that way (or it's a bug that can be fixed). > Ignoring unsupported C++ language features, for now, I don't think there's > any reason why libstdc++ would need to be cut down. We already build the > full libgfortran for amdgcn. System calls that make no sense on the GPU were > implemented as stubs in Newlib (mostly returning some reasonable errno > value), and it would be straight-forward to implement more the same way. But it's a waste of space in the .so to build lots of symbols that use the stubs. There are other reasons it might be nice to be able to configure libstdc++ for something in between a full hosted environment and a minimal freestanding one. > I believe static constructors work (libgfortran uses some), but exception > handling does not. I'm not sure what other exotica C++ might need? Ideally, __cxa_atexit and __cxa_thread_atexit for static and thread-local destructors, but we can survive without them (and have not-fully-conforming destruction ordering).
next prev parent reply other threads:[~2021-07-21 9:33 UTC|newest] Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-21 6:40 [Bug c++/101544] New: [OpenMP] 'declare target' block around class – " burnus at gcc dot gnu.org 2021-07-21 7:58 ` [Bug target/101544] [OpenMP][AMDGCN][nvptx] C++ offloading: " burnus at gcc dot gnu.org 2021-07-21 8:05 ` jakub at gcc dot gnu.org 2021-07-21 9:06 ` ams at gcc dot gnu.org 2021-07-21 9:33 ` redi at gcc dot gnu.org [this message] 2021-07-21 10:03 ` ams at gcc dot gnu.org 2021-07-21 13:27 ` rguenth at gcc dot gnu.org 2021-07-21 13:37 ` redi at gcc dot gnu.org 2021-07-26 12:01 ` tschwinge at gcc dot gnu.org 2022-07-22 13:32 ` tschwinge at gcc dot gnu.org 2022-07-22 14:04 ` tschwinge at gcc dot gnu.org 2022-07-25 11:20 ` rguenth at gcc dot gnu.org 2023-06-01 19:27 ` tschwinge 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-101544-4-yvsA3hwtWj@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).