Bug 275431 - lang/gcc12: install ISO_Fortran_binding.h in a separate directory
Summary: lang/gcc12: install ISO_Fortran_binding.h in a separate directory
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Lorenzo Salvadore
URL:
Keywords:
Depends on:
Blocks: 275317 275432
  Show dependency treegraph
 
Reported: 2023-11-29 17:46 UTC by Thierry Thomas
Modified: 2023-12-05 18:12 UTC (History)
0 users

See Also:
salvadore: maintainer-feedback+


Attachments
lang/gcc12: install ISO_Fortran_binding.h in a separate directory (2.00 KB, patch)
2023-11-29 17:46 UTC, Thierry Thomas
salvadore: maintainer-approval+
Details | Diff
Introduce a new CFLAGS for ISO_Fortran_binding.h (931 bytes, patch)
2023-11-29 17:47 UTC, Thierry Thomas
thierry: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thierry Thomas freebsd_committer freebsd_triage 2023-11-29 17:46:19 UTC
Created attachment 246666 [details]
lang/gcc12: install ISO_Fortran_binding.h in a separate directory

ISO_Fortran_binding.h is sometimes needed for the support of Fortran 2018, e.g. MPICH must find it to build mpi_f08.mod.
    
ATM it is installed in a directory depending on $CONFIGURE_TARGET with a complex path, and it is not possible to point CFLAGS towards this directory because other headers (like stdatomic.h) would conflict with those from the system.
    
Therefore create a new directory /usr/local/include/gcc12 to install this header.

Secondly introduce a new CFLAGS for ISO_Fortran_binding.h into Mk/Uses/fortran.mk.

Define CFLAGS_F2018: if needed it will point towards the directory containing ISO_Fortran_binding. (installed by GCC).

Of course, this patch should be applied too in lang/gcc13 and later, but there is no hurry.
Comment 1 Thierry Thomas freebsd_committer freebsd_triage 2023-11-29 17:47:58 UTC
Created attachment 246667 [details]
Introduce a new CFLAGS for ISO_Fortran_binding.h

Define CFLAGS_F2018: if needed it will point towards the directory containing ISO_Fortran_binding. (installed by GCC).
Comment 2 Lorenzo Salvadore freebsd_committer freebsd_triage 2023-12-05 11:44:48 UTC
Comment on attachment 246666 [details]
lang/gcc12: install ISO_Fortran_binding.h in a separate directory

Approved, thanks Thierry.
Consider it approved for lang/gcc13 too and please forward the patch to lang/12-devel, lang/gcc13-devel and lang/gcc14-devel too.

Thanks.
Comment 3 Thierry Thomas freebsd_committer freebsd_triage 2023-12-05 18:11:36 UTC
Committed, thanks!
Comment 4 commit-hook freebsd_committer freebsd_triage 2023-12-05 18:12:32 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dd37ac872d5164606777732108cdf24f68210688

commit dd37ac872d5164606777732108cdf24f68210688
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2023-11-28 21:26:21 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2023-12-05 18:11:27 +0000

    Mk/Uses/fortran.mk: introduce a new CFLAGS for ISO_Fortran_binding.h

    Define CFLAGS_F2018: if needed it will point towards the directory
    containing ISO_Fortran_binding. (installed by GCC).

    PR:             275431

 Mk/Uses/fortran.mk | 1 +
 1 file changed, 1 insertion(+)
Comment 5 commit-hook freebsd_committer freebsd_triage 2023-12-05 18:12:33 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=510dbd1e2012877cbbdc37a38f6189ce7b38d1ba

commit 510dbd1e2012877cbbdc37a38f6189ce7b38d1ba
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2023-12-05 18:07:50 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2023-12-05 18:11:27 +0000

    lang/gcc12+: forward the installation of ISO_Fortran_binding.h in a separate dir

    PR:             275431
    Approved by:    salvadore@ (maintainer)

 lang/gcc12-devel/Makefile  | 5 +++++
 lang/gcc12-devel/pkg-plist | 1 +
 lang/gcc13-devel/Makefile  | 5 +++++
 lang/gcc13-devel/pkg-plist | 1 +
 lang/gcc13/Makefile        | 5 +++++
 lang/gcc13/pkg-plist       | 1 +
 lang/gcc14-devel/Makefile  | 5 +++++
 lang/gcc14-devel/pkg-plist | 1 +
 8 files changed, 24 insertions(+)
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-12-05 18:12:34 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3c2b953b9cde73c0d2770889cd83d66e707cdfeb

commit 3c2b953b9cde73c0d2770889cd83d66e707cdfeb
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2023-11-28 21:12:45 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2023-12-05 18:11:27 +0000

    lang/gcc12: install ISO_Fortran_binding.h in a separate directory

    ISO_Fortran_binding.h is sometimes needed for the support of Fortran
    2018, e.g. MPICH must find it to build mpi_f08.mod.

    ATM it is installed in a directory depending on $CONFIGURE_TARGET with
    a complex path, and it is not possible to point CFLAGS towards this dir
    because other headers (like stdatomic.h) would conflict with those from
    the system.

    Therefore create a new directory /usr/local/include/gcc12 to install
    this header.

    PR:             275431
    Approved by:    salvadore@ (maintainer)

 lang/gcc12/Makefile  | 6 +++++-
 lang/gcc12/pkg-plist | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)