Skip to content

Commit

Permalink
compiler-families: update GCC to 14.2
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Reber <[email protected]>
  • Loading branch information
adrianreber committed Sep 12, 2024
1 parent 8b02d0d commit 4f311a2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
7 changes: 6 additions & 1 deletion components/OHPC_macros
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,18 @@ BuildRequires: ohpc-buildroot
# these choices can be overridden by specifing the compiler_family/mpi_family
# variables via rpmbuild or other mechanisms.

%{!?compiler_family: %global compiler_family gnu13}
%{!?compiler_family: %global compiler_family gnu14}
%{!?mpi_family: %global mpi_family openmpi5}
%{!?python_family: %global python_family python3}

# Compiler dependencies
%if 0%{?ohpc_compiler_dependent} == 1

%if "%{compiler_family}" == "gnu14"
BuildRequires: gnu14-compilers%{PROJ_DELIM} >= 14.1.0
Requires: gnu14-compilers%{PROJ_DELIM} >= 14.1.0
%global gnu_family gnu14
%endif
%if "%{compiler_family}" == "gnu13"
BuildRequires: gnu13-compilers%{PROJ_DELIM} >= 13.1.0
Requires: gnu13-compilers%{PROJ_DELIM} >= 13.1.0
Expand Down
7 changes: 7 additions & 0 deletions components/OHPC_setup_compiler
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ elif [ "${OHPC_COMPILER_FAMILY}" = "gnu13" ]; then
export F77=gfortran
module purge
module load gnu13
elif [ "${OHPC_COMPILER_FAMILY}" = "gnu14" ]; then
export CC=gcc
export CXX=g++
export FC=gfortran
export F77=gfortran
module purge
module load gnu14
elif [ "${OHPC_COMPILER_FAMILY}" = "gnu9" ]; then
export CC=gcc
export CXX=g++
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
%global gnu13_mpc_version 1.3.1
%global gnu13_mpfr_version 4.2.1

%global gnu14_version 14.2.0
%global gnu14_gmp_version 6.3.0
%global gnu14_mpc_version 1.3.1
%global gnu14_mpfr_version 4.2.1

%if "%{compiler_family}" == "gnu12"
%global gnu_major_ver gnu12
%global gnu_version %{gnu12_version}
Expand All @@ -28,6 +33,10 @@
%global gnu_major_ver gnu13
%global gnu_version %{gnu13_version}
%endif
%if "%{compiler_family}" == "gnu14"
%global gnu_major_ver gnu14
%global gnu_version %{gnu14_version}
%endif

Source0: https://ftp.gnu.org/gnu/gcc/gcc-%{gnu12_version}/gcc-%{gnu12_version}.tar.xz
Source1: https://ftp.gnu.org/gnu/gmp/gmp-%{gnu12_gmp_version}.tar.bz2
Expand All @@ -39,6 +48,11 @@ Source5: https://ftp.gnu.org/gnu/gmp/gmp-%{gnu13_gmp_version}.tar.bz2
Source6: https://ftp.gnu.org/gnu/mpc/mpc-%{gnu13_mpc_version}.tar.gz
Source7: https://ftp.gnu.org/gnu/mpfr/mpfr-%{gnu13_mpfr_version}.tar.gz

Source8: https://ftp.gnu.org/gnu/gcc/gcc-%{gnu14_version}/gcc-%{gnu14_version}.tar.xz
Source9: https://ftp.gnu.org/gnu/gmp/gmp-%{gnu14_gmp_version}.tar.bz2
Source10: https://ftp.gnu.org/gnu/mpc/mpc-%{gnu14_mpc_version}.tar.gz
Source11: https://ftp.gnu.org/gnu/mpfr/mpfr-%{gnu14_mpfr_version}.tar.gz

%global pname %{gnu_major_ver}-compilers

Summary: The GNU C Compiler and Support Files
Expand Down Expand Up @@ -95,6 +109,14 @@ ln -s mpc-%{gnu13_mpc_version} mpc
ln -s mpfr-%{gnu13_mpfr_version} mpfr
%endif

%if "%{compiler_family}" == "gnu14"
%setup -T -q -n gcc-%{version} -b8 -a9 -a10 -a11

ln -s gmp-%{gnu14_gmp_version} gmp
ln -s mpc-%{gnu14_mpc_version} mpc
ln -s mpfr-%{gnu14_mpfr_version} mpfr
%endif

%build

%if 0%{?openEuler}
Expand Down

0 comments on commit 4f311a2

Please sign in to comment.