From: "Arsen Arsenović" <arsen@aarsen.me>
To: Lorenzo Salvadore <developer@lorenzosalvadore.it>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"jit@gcc.gnu.org" <jit@gcc.gnu.org>,
"rguenth@gcc.gnu.org" <rguenth@gcc.gnu.org>,
"dmalcolm@gcc.gnu.org" <dmalcolm@gcc.gnu.org>
Subject: Ping: [PATCH] jit: Install jit headers in $(libsubincludedir) [PR 101491]
Date: Sat, 28 Dec 2024 13:58:51 +0100 [thread overview]
Message-ID: <861pxsvu9g.fsf@aarsen.me> (raw)
In-Reply-To: <ORTB8ja1orPQI2PlPNzQUO4jsLD8w4L7DFPV-Gc_lt29nt6oJn7d4sVnjtdlnn4ehnd0FBYvRUR0lH1QTVFVku2n94g-7xC5xi2Nq2jUSG0=@lorenzosalvadore.it> (Lorenzo Salvadore's message of "Wed, 16 Nov 2022 16:03:17 +0000")
[-- Attachment #1: Type: text/plain, Size: 4159 bytes --]
Hi,
Gentle ping on this patch.
Also, it would be nice if GCC installed libgccjit.pc to include the
directory libgccjit headers and libraries are installed in correctly
always.
Currently, users of libgccjit have to assume GCC includes it in its
include path always, but that might not be true if GCC is not used to
build the consumer of the library.
Happy holidays!
Lorenzo Salvadore <developer@lorenzosalvadore.it> writes:
> Hello,
>
> I would like to submit the patch below addressing bug jit/101491.
> Please note that another patch has also been submitted in the bug
> report by another FreeBSD user. We worked indipendently. The two
> patches look functionally equivalent but use different styles. In
> particular, I followed Richard Biener's suggestion from
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101491#c5 .
>
> Thanks,
>
> Lorenzo Salvadore
>
> ---
>
>>From f8e2c2ee89a7d8741bb65163d1f1c20edcd546ac Mon Sep 17 00:00:00 2001
> From: Lorenzo Salvadore <developer@lorenzosalvadore.it>
> Date: Wed, 16 Nov 2022 11:27:38 +0100
> Subject: [PATCH] jit: Install jit headers in $(libsubincludedir) [PR 101491]
>
> Installing jit/libgccjit.h and jit/libgccjit++.h headers in
> $(includedir) can be a problem for machines where multiple versions of
> GCC are required simultaneously, see for example this bug report on
> FreeBSD:
>
> https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=257060
>
> Hence,
>
> - define $(libsubincludedir) the same way it is defined in libgomp;
> - install jit/libgccjit.h and jit/libgccjit++.h in $(libsubincludedir).
>
> The patch has already been applied successfully in the official FreeBSD
> ports tree for the ports lang/gcc11 and lang/gcc12. Please see the
> following commits:
>
> https://cgit.freebsd.org/ports/commit/?id=0338e04504ee269b7a95e6707f1314bc1c4239fe
> https://cgit.freebsd.org/ports/commit/?id=f1957296ed2dce8a09bb9582e9a5a715bf8b3d4d
>
> gcc/ChangeLog:
>
> 2022-11-16 Lorenzo Salvadore <developer@lorenzosalvadore.it>
>
> PR jit/101491
> * Makefile.in: Define and create $(libsubincludedir)
>
> gcc/jit/ChangeLog:
>
> 2022-11-16 Lorenzo Salvadore <developer@lorenzosalvadore.it>
>
> PR jit/101491
> * Make-lang.in: Install headers in $(libsubincludedir)
> ---
> gcc/Makefile.in | 3 +++
> gcc/jit/Make-lang.in | 4 ++--
> 2 files changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/gcc/Makefile.in b/gcc/Makefile.in
> index f672e6ea549..3bcf1c491ab 100644
> --- a/gcc/Makefile.in
> +++ b/gcc/Makefile.in
> @@ -635,6 +635,8 @@ libexecdir = @libexecdir@
>
> # Directory in which the compiler finds libraries etc.
> libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
> +# Directory in which the compiler finds headers.
> +libsubincludedir = $(libdir)/gcc/$(target_alias)/$(version)/include
> # Directory in which the compiler finds executables
> libexecsubdir = $(libexecdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_dir_suffix)
> # Directory in which all plugin resources are installed
> @@ -3642,6 +3644,7 @@ install-cpp: installdirs cpp$(exeext)
> # $(libdir)/gcc/include isn't currently searched by cpp.
> installdirs:
> $(mkinstalldirs) $(DESTDIR)$(libsubdir)
> + $(mkinstalldirs) $(DESTDIR)$(libsubincludedir)
> $(mkinstalldirs) $(DESTDIR)$(libexecsubdir)
> $(mkinstalldirs) $(DESTDIR)$(bindir)
> $(mkinstalldirs) $(DESTDIR)$(includedir)
> diff --git a/gcc/jit/Make-lang.in b/gcc/jit/Make-lang.in
> index 248ec45b729..ba1b3e95da5 100644
> --- a/gcc/jit/Make-lang.in
> +++ b/gcc/jit/Make-lang.in
> @@ -360,9 +360,9 @@ selftest-jit:
> # Install hooks:
> jit.install-headers: installdirs
> $(INSTALL_DATA) $(srcdir)/jit/libgccjit.h \
> - $(DESTDIR)$(includedir)/libgccjit.h
> + $(DESTDIR)$(libsubincludedir)/libgccjit.h
> $(INSTALL_DATA) $(srcdir)/jit/libgccjit++.h \
> - $(DESTDIR)$(includedir)/libgccjit++.h
> + $(DESTDIR)$(libsubincludedir)/libgccjit++.h
>
> ifneq (,$(findstring mingw,$(target)))
> jit.install-common: installdirs jit.install-headers
--
Arsen Arsenović
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 381 bytes --]
next prev parent reply other threads:[~2024-12-28 12:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 16:03 Lorenzo Salvadore
2024-12-28 12:58 ` Arsen Arsenović [this message]
2022-12-03 19:34 Ping: " Lorenzo Salvadore
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=861pxsvu9g.fsf@aarsen.me \
--to=arsen@aarsen.me \
--cc=developer@lorenzosalvadore.it \
--cc=dmalcolm@gcc.gnu.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=jit@gcc.gnu.org \
--cc=rguenth@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).