public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-rust@gcc.gnu.org
Subject: [Bug rust/113499] crab1 fails to link when configuring with --disable-plugin
Date: Mon, 15 Apr 2024 06:21:16 +0000	[thread overview]
Message-ID: <bug-113499-35322-iSLJevs0Rv@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113499-35322@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113499

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Arthur Cohen from comment #6)
> (In reply to Richard Biener from comment #5)
> > (In reply to Thomas Schwinge from comment #4)
> > > If I understood Arthur correctly, GCC/Rust is going to effectively require
> > > 'dlopen' (and therefore '--enable-plugin'?), so that means, if the latter's
> > > not available we have to auto-disable Rust language front end if enabled
> > > '--enable-languages=all' vs. raise a 'configure'-time error if enabled via
> > > explicit '--enable-languages=rust'?
> > 
> > Not sure - --enable-plugin is not about dlopen, it's about exporting all
> > GCCs internal symbols for use by a dlopened shared module.  Is the
> > macro processing requiring this or is it rather self-contained?
> > 
> > Being able to dlopen() is something different.
> 
> No, it does not require this and is rather self contained. Macro expansion
> needs to be able to dlopen() compiled Rust libraries, which contain a
> specific type of function our frontend calls as a macro. So we always need
> to dlopen().
> 
> Is there anything similar in other frontends? If so, how does it work on
> such platforms which do not support dlopen()?

I'm not aware of other frontends absolutely requiring dlopen(), but the
Modula-2 frontend uses a plugin for some extended diagnostics (but that
requires a "real" plugin, with exporting symbols from GCC).

I'm not aware of any abstraction for host shared module opening (to cover
windows for example), I suppose in the end we need to have such a thing
(like libiberty pex_* for execve/wait).  Maybe there's functionality in
gnulib for this.

For now I suggest to look for dlopen(), there's

# Some systems need dlopen
save_LIBS="$LIBS"
LIBS=
AC_SEARCH_LIBS(dlopen, dl) 
DL_LIB="$LIBS"
LIBS="$save_LIBS"
AC_SUBST(DL_LIB)

in gcc/configure.ac, so adding DL_LIB to the crab1 link should possibly
suffice.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

      parent reply	other threads:[~2024-04-15  6:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19  6:55 [Bug rust/113499] New: " rguenth at gcc dot gnu.org
2024-01-19  7:05 ` [Bug rust/113499] " rguenth at gcc dot gnu.org
2024-01-19  7:08 ` rguenth at gcc dot gnu.org
2024-02-09 13:33 ` rguenth at gcc dot gnu.org
2024-02-09 13:35 ` rguenth at gcc dot gnu.org
2024-03-18 11:20 ` tschwinge at gcc dot gnu.org
2024-03-18 12:33 ` rguenth at gcc dot gnu.org
2024-04-12 15:22 ` cohenarthur at gcc dot gnu.org
2024-04-12 18:07 ` xry111 at gcc dot gnu.org
2024-04-15  6:21 ` rguenth at gcc dot gnu.org [this message]

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-113499-35322-iSLJevs0Rv@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-rust@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: link
Be 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).