From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-4317.proton.ch (mail-4317.proton.ch [185.70.43.17]) by sourceware.org (Postfix) with ESMTPS id D8F17395B408 for ; Wed, 16 Nov 2022 16:03:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D8F17395B408 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=lorenzosalvadore.it Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=lorenzosalvadore.it Date: Wed, 16 Nov 2022 16:03:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lorenzosalvadore.it; s=protonmail; t=1668614606; x=1668873806; bh=Y+jTZJ4J6MZfiYJ/QacFba6hpD5l5Mhekm6CyJArSqI=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=BgRlW0Me0FC2LOcZehaJ6dy/G3GByJMpSrS3Gi25nPx51MVgknMhoc7oVnXFBZPpu qJx+2Y9/8M64oIoBn2efUteZSKtIL+QseSPTSLbCLiizEwbGrmVVSaG1w3eLcE3p8I xI4vrn940QXilocDFcMSM/IJZuxpQmKBpc88dMl0FOdcpTp64p9Z6NwBgE3tcaDHl1 C+ULU9a04acT5pWrfV4ptfWVtZh7tC/zA51e9alWhe8TTHDkhk/BIswhRhud8u2tAB LgVrzmhYwsc5sz6R9mMUql9ZuGC9bGtsHgDegwmh4bneIsytTC6sXNP2GKgAa6u7JV TvorHNy34TF8g== To: "gcc-patches@gcc.gnu.org" , "jit@gcc.gnu.org" From: Lorenzo Salvadore Cc: "rguenth@gcc.gnu.org" , "dmalcolm@gcc.gnu.org" Subject: [PATCH] jit: Install jit headers in $(libsubincludedir) [PR 101491] Message-ID: Feedback-ID: 53711648:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-13.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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=3D101491#c5 . Thanks, Lorenzo Salvadore --- >From f8e2c2ee89a7d8741bb65163d1f1c20edcd546ac Mon Sep 17 00:00:00 2001 From: Lorenzo Salvadore 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=3D257060 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=3D0338e04504ee269b7a95e6707f1314b= c1c4239fe https://cgit.freebsd.org/ports/commit/?id=3Df1957296ed2dce8a09bb9582e9a5a71= 5bf8b3d4d gcc/ChangeLog: 2022-11-16 Lorenzo Salvadore =09PR jit/101491 * Makefile.in: Define and create $(libsubincludedir) gcc/jit/ChangeLog: 2022-11-16 Lorenzo Salvadore =09PR 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 =3D @libexecdir@ # Directory in which the compiler finds libraries etc. libsubdir =3D $(libdir)/gcc/$(real_target_noncanonical)/$(version)$(accel_= dir_suffix) +# Directory in which the compiler finds headers. +libsubincludedir =3D $(libdir)/gcc/$(target_alias)/$(version)/include # Directory in which the compiler finds executables libexecsubdir =3D $(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: =09$(mkinstalldirs) $(DESTDIR)$(libsubdir) +=09$(mkinstalldirs) $(DESTDIR)$(libsubincludedir) =09$(mkinstalldirs) $(DESTDIR)$(libexecsubdir) =09$(mkinstalldirs) $(DESTDIR)$(bindir) =09$(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 =09$(INSTALL_DATA) $(srcdir)/jit/libgccjit.h \ -=09 $(DESTDIR)$(includedir)/libgccjit.h +=09 $(DESTDIR)$(libsubincludedir)/libgccjit.h =09$(INSTALL_DATA) $(srcdir)/jit/libgccjit++.h \ -=09 $(DESTDIR)$(includedir)/libgccjit++.h +=09 $(DESTDIR)$(libsubincludedir)/libgccjit++.h ifneq (,$(findstring mingw,$(target))) jit.install-common: installdirs jit.install-headers -- 2.38.0