public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrea Corallo <andrea.corallo@arm.com>
To: Daurnimator <quae@daurnimator.com>
Cc: David Malcolm <dmalcolm@redhat.com>,  jit@gcc.gnu.org
Subject: Re: libgccjit questions
Date: Wed, 09 Sep 2020 10:18:41 +0200	[thread overview]
Message-ID: <gkrr1rbz7ku.fsf@arm.com> (raw)
In-Reply-To: <CAEnbY+cxMW3JjE7Av-sMQS8wLGOPQdcvFrtj3etXkXYdr0+2sw@mail.gmail.com> (Daurnimator's message of "Wed, 9 Sep 2020 12:50:42 +1000")

Daurnimator <quae@daurnimator.com> writes:

> Hi,

Hi!

> I'm looking into using libgccjit as an ahead-of-time compiler to write
> a backend for zig (https://ziglang.org/)
> I've got a few questions I hope you can answer:
>
> What became of cross-compilation? I saw it mentioned as a possible
> roadmap item in
> https://gcc.gnu.org/legacy-ml/jit/2015-q3/msg00086.html)

AFAIK cross compilation is not supported and nothing is going on in that
sense.  I believe this is in line with the idea of libgccjit being
mainly intended for making jitters.

> How can I support inline assembly?

I believe you cannot use inline assembly as we have no specific support
for that and asm and __asm__ are not builtin functions so they can't be
used with gcc_jit_context_get_builtin_function.

> Would it be reasonable to add an API that allows extracting sections
> without writing out to a file and reading it back in?

The elf file is always produced because the assembler is invoked as a
child process, so as of today this cannot happen in memory.

> Alteratively, would it be possible to get a pointer and length to e.g.
> an ELF in memory?
>
> Should distros be packaging libgccjit?
> I noticed that e.g. ArchLinux is not. Possibly because it is
> documented as "experimental"; possibly because it requires building
> gcc with --enable-host-shared ?

Most distros are already packing libgccjit, even if the quality of the
package may vary.

> What is the license situation with libgccjit; is it GPL? LGPL? what
> does this mean for code that uses libgccjit?

AFAIU libgccjit is part of GCC and this is released under the GNU
General Public License.

> Thanks,
> Daurnimator

Bests

  Andrea
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

  reply	other threads:[~2020-09-09  8:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-09  2:50 Daurnimator
2020-09-09  8:18 ` Andrea Corallo [this message]
2020-09-10 22:50   ` David Malcolm
2020-09-11  2:42     ` Daurnimator

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=gkrr1rbz7ku.fsf@arm.com \
    --to=andrea.corallo@arm.com \
    --cc=dmalcolm@redhat.com \
    --cc=jit@gcc.gnu.org \
    --cc=quae@daurnimator.com \
    /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).