cc'ing maintainer,

On Tue, Dec 07 2021, Timo Myyrä <timo.my...@bittivirhe.fi> wrote:
> Hi,
>
> The upcoming emacs 28 has native compilation feature which allows it to
> use gcc to compile emacs lisp files to loadable libraries by using the
> libgccjit library. This library is not currently provided by the lang/gcc port
> and I took first stab at getting it done.

I've heard about this feature, but I'm not eager to make use of it.
We'll have to weigh the pros and cons.  emacs is already a complex port
which has become a bit easier to handle since the pdumper was
introduced.  I have no idea how deep this gccjit rabbit-hole is.

Do you have a working setup?  Care to share the details?

> The --enable-host-shared flag is required by the jit LANG but I'm not
> sure if it is wise to put in generic CONFIGURE_ARGS.

  https://gcc.gnu.org/install/configure.html

--enable-host-shared

    Specify that the host code should be built into position-independent
    machine code (with -fPIC), allowing it to be used within shared
    libraries, but yielding a slightly slower compiler.

    This option is required when building the libgccjit.so library.

    Contrast with --enable-shared, which affects target libraries.

No idea whether this is relevant to us.  We're building the egcc
executable with PIE, for example, so maybe we already pay the price of
PIC code.

> How does this look?

One thing struck me,

> blob - /dev/null
> file + lang/gcc/11/pkg/PLIST-jit
> --- /dev/null
> +++ lang/gcc/11/pkg/PLIST-jit
> @@ -0,0 +1,7 @@
> +@comment $OpenBSD$
> +include/libgccjit++.h
> +include/libgccjit.h
> +@info info/libgccjit.info

> +@so lib/libgccjit.so
> +lib/libgccjit.so.0
> +@bin lib/libgccjit.so.0.0.1

This looks incorrect.

> blob - /dev/null
> file + lang/gcc/8/pkg/PLIST-jit
> --- /dev/null
> +++ lang/gcc/8/pkg/PLIST-jit
> @@ -0,0 +1,5 @@
> +@comment $OpenBSD: PLIST-jit,v$
> +@lib lib/libgccjit.so.${LIBgccjit_VERSION}

This looks correct.

> +include/libgccjit++.h
> +include/libgccjit.h
> +@info info/libgccjit.info


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to