From: Khem Raj Date: Thu, 5 Jun 2025 03:43:09 +0000 (-0700) Subject: gcc: Turn FORTRAN into a weak assignment X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=50abae55eda0115d073bbc6552f2fcb4ecbb7949;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git gcc: Turn FORTRAN into a weak assignment This ensures that it can be turned on from a distro layer config metadata e.g. local.conf without forcing overrides currently we have do something like FORTRAN:forcevariable = ",fortran" RUNTIMETARGET:append:pn-gcc-runtime = " libquadmath " TOOLCHAIN_TARGET_TASK:append = " gfortran" to enabled fortran support from distro conf file. After this change we can do it with FORTRAN = ",fortran" RUNTIMETARGET:append:pn-gcc-runtime = " libquadmath " TOOLCHAIN_TARGET_TASK:append = " gfortran" Signed-off-by: Khem Raj Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/gcc/gcc-15.1.inc b/meta/recipes-devtools/gcc/gcc-15.1.inc index 0032500cdcc..18f8cae5ca2 100644 --- a/meta/recipes-devtools/gcc/gcc-15.1.inc +++ b/meta/recipes-devtools/gcc/gcc-15.1.inc @@ -79,7 +79,7 @@ S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${SOURCEDIR}" B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" # Language Overrides -FORTRAN = "" +FORTRAN ?= "" SSP ?= "--disable-libssp" SSP:mingw32 = "--enable-libssp" diff --git a/meta/recipes-devtools/gcc/gcc-configure-common.inc b/meta/recipes-devtools/gcc/gcc-configure-common.inc index 5c799362429..e3fb48c0301 100644 --- a/meta/recipes-devtools/gcc/gcc-configure-common.inc +++ b/meta/recipes-devtools/gcc/gcc-configure-common.inc @@ -6,7 +6,7 @@ require gcc-shared-source.inc # These can be overridden by the version specific .inc file. # gcc 3.x expects 'f77', 4.0 expects 'f95', 4.1 and 4.2 expect 'fortran' -FORTRAN ?= ",fortran" +FORTRAN ??= ",fortran" LANGUAGES ?= "c,c++${FORTRAN}" EXTRA_OECONF_BASE ?= ""