lang/gcc12: Fix conflict on libgccjit.h and libgccjit++.h

GCC 11, GCC 12 and GCC 13 install libgccjit.h and libgccjit++.h in the
same directory.

Fix conflict for lang/gcc12, which is soon to become GCC_DEFAULT, by
installing those files in a directory specific to GCC 12.

See also commit 0338e04504 that fixed the
conflict in the same way for lang/gcc11.

PR:		257060
This commit is contained in:
Lorenzo Salvadore 2022-11-09 10:05:08 +01:00
parent 4d4c08ea1c
commit f1957296ed
No known key found for this signature in database
GPG Key ID: B58F7C3CF6DB8A38
4 changed files with 34 additions and 3 deletions

View File

@ -1,6 +1,6 @@
PORTNAME= gcc
PORTVERSION= 12.2.0
PORTREVISION= 2
PORTREVISION= 3
CATEGORIES= lang
MASTER_SITES= GCC
PKGNAMESUFFIX= ${SUFFIX}

View File

@ -0,0 +1,19 @@
--- gcc/Makefile.in.orig 2022-11-02 20:13:34 UTC
+++ gcc/Makefile.in
@@ -630,6 +630,8 @@ libsubdir = $(libdir)/gcc/$(real_target_noncanonical)/
# 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
@@ -3609,6 +3611,7 @@ installdirs:
# $(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)

View File

@ -0,0 +1,14 @@
--- gcc/jit/Make-lang.in.orig 2022-11-02 17:25:43 UTC
+++ gcc/jit/Make-lang.in
@@ -355,9 +355,9 @@ jit.install-headers: installdirs
# 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

View File

@ -18,8 +18,6 @@ bin/gcov-dump%%SUFFIX%%
bin/gcov-tool%%SUFFIX%%
bin/gfortran%%SUFFIX%%
bin/lto-dump%%SUFFIX%%
include/libgccjit++.h
include/libgccjit.h
man/man1/cpp%%SUFFIX%%.1.gz
man/man1/g++%%SUFFIX%%.1.gz
man/man1/gcc%%SUFFIX%%.1.gz