public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Foreseen update to ada.eclass to allow use of gcc:14 and gcc:15
@ 2024-09-29 13:44 Alfredo Tupone
  2024-09-29 17:00 ` Sam James
  0 siblings, 1 reply; 2+ messages in thread
From: Alfredo Tupone @ 2024-09-29 13:44 UTC (permalink / raw
  To: gentoo-dev

diff --git a/eclass/ada.eclass b/eclass/ada.eclass
index 3c3fa3c01453..faff19a6ac85 100644
--- a/eclass/ada.eclass
+++ b/eclass/ada.eclass
@@ -45,31 +45,31 @@ _ADA_ECLASS=1
 #   dev-foo/mydep"
 # DEPEND="${RDEPEND}"
 # @CODE
 #
 # Example value:
 # @CODE
 # ada_target_gcc_12? ( sys-devel/gcc:12[ada] )
 # ada_target_gnat_2021? ( dev-lang/gnat-gps:2021[ada] )
 # @CODE
 
 # @ECLASS_VARIABLE: _ADA_ALL_IMPLS
 # @INTERNAL
 # @DESCRIPTION:
 # All supported Ada implementations, most preferred last.
 _ADA_ALL_IMPLS=(
-	gnat_2021 gcc_12 gcc_13
+	gnat_2021 gcc_12 gcc_13 gcc_14 gcc_15
 )
 readonly _ADA_ALL_IMPLS
 
 # @ECLASS_VARIABLE: ADA_REQUIRED_USE
 # @OUTPUT_VARIABLE
 # @DESCRIPTION:
 # This is an eclass-generated required-use expression which ensures
 # that exactly one ADA_TARGET value has been enabled.
 #
 # This expression should be utilized in an ebuild by including it in
 # REQUIRED_USE, optionally behind a use flag.
 #
 # Example use:
 # @CODE
 # REQUIRED_USE="ada? ( ${ADA_REQUIRED_USE} )"
@@ -107,31 +107,31 @@ readonly _ADA_ALL_IMPLS
 # is still supported.
 #
 # Returns 0 if the implementation is valid and supported. If it is
 # unsupported, returns 1 -- and the caller should ignore the entry.
 # If it is invalid, dies with an appropriate error message.
 _ada_impl_supported() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	[[ ${#} -eq 1 ]] || die "${FUNCNAME}: takes exactly 1 argument
(impl)." 
 	local impl=${1}
 
 	# keep in sync with _ADA_ALL_IMPLS!
 	# (not using that list because inline patterns shall be faster)
 	case "${impl}" in
-		gnat_2021|gcc_12|gcc_13)
+		gnat_2021|gcc_12|gcc_13|gcc_14|gcc_15)
 			return 0
 			;;
 		*)
 			[[ ${ADA_COMPAT_NO_STRICT} ]] && return 1
 			die "Invalid implementation in ADA_COMPAT:
${impl}" esac
 }
 
 # @FUNCTION: _ada_set_impls
 # @INTERNAL
 # @DESCRIPTION:
 # Check ADA_COMPAT for well-formedness and validity, then set
 # two global variables:
 #
 # - _ADA_SUPPORTED_IMPLS containing valid implementations supported
@@ -201,58 +201,66 @@ _ada_set_impls() {
 #
 # The optional first parameter may specify the requested Ada
 # implementation (either as ADA_TARGETS value, e.g. ada2_7,
 # or an EADA one, e.g. ada2.7). If no implementation passed,
 # the current one will be obtained from ${EADA}.
 #
 # The variables which can be exported are: GCC, EADA, GNATMAKE.
 # They are described more completely in the eclass
 # variable documentation.
 ada_export() {
 	debug-print-function ${FUNCNAME} "${@}"
 
 	local impl var
 
 	case "${1}" in
-		gnat_2021|gcc_12|gcc_13)
+		gnat_2021|gcc_12|gcc_13|gcc_14|gcc_15)
 			impl=${1}
 			shift
 			;;
 		*)
 			impl=${EADA}
 			if [[ -z ${impl} ]]; then
 				die "ada_export called without a ada
implementation and EADA is unset" fi
 			;;
 	esac
 	debug-print "${FUNCNAME}: implementation: ${impl}"
 
 	local gcc_pv
 	local slot
 	case "${impl}" in
 		gnat_2021)
 			gcc_pv=10
 			slot=10
 			;;
 		gcc_12)
 			gcc_pv=12
 			slot=12
 			;;
 		gcc_13)
 			gcc_pv=13
 			slot=13
 			;;
+		gcc_14)
+			gcc_pv=14
+			slot=14
+			;;
+		gcc_15)
+			gcc_pv=15
+			slot=15
+			;;
 		*)
 			gcc_pv="9.9.9"
 			slot=9.9.9
 			;;
 	esac
 
 	for var; do
 		case "${var}" in
 			EADA)
 				export EADA=${impl}
 				debug-print "${FUNCNAME}: EADA =
${EADA}" ;;
 			GCC)
 				export
GCC=${EPREFIX}/usr/bin/gcc-${gcc_pv} debug-print "${FUNCNAME}: GCC =
${GCC}" @@ -282,31 +290,31 @@ ada_export() {
 				debug-print "${FUNCNAME}: GNATLS =
${GNATLS}" ;;
 			GNATPREP)
 				export
GNATPREP=${EPREFIX}/usr/bin/gnatprep-${gcc_pv} debug-print
"${FUNCNAME}: GNATPREP = ${GNATPREP}" ;;
 			GNATCHOP)
 				export
GNATCHOP=${EPREFIX}/usr/bin/gnatchop-${gcc_pv} debug-print
"${FUNCNAME}: GNATCHOP = ${GNATCHOP}" ;;
 			ADA_PKG_DEP)
 				case "${impl}" in
 					gnat_2021)
 						ADA_PKG_DEP="dev-lang/gnat-gpl:${slot}[ada]"
 						;;
-					gcc_12|gcc_13)
+					gcc_12|gcc_13|gcc_14|gcc_15)
 						ADA_PKG_DEP="sys-devel/gcc:${slot}[ada]"
 						;;
 					*)
 						ADA_PKG_DEP="=sys-devel/gcc-${gcc_pv}*[ada]"
 						;;
 				esac
 
 				# use-dep
 				if [[ ${ADA_REQ_USE} ]]; then
 					ADA_PKG_DEP+=[${ADA_REQ_USE}]
 				fi
 
 				export ADA_PKG_DEP
 				debug-print "${FUNCNAME}: ADA_PKG_DEP
= ${ADA_PKG_DEP}" ;;


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-29 17:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-29 13:44 [gentoo-dev] Foreseen update to ada.eclass to allow use of gcc:14 and gcc:15 Alfredo Tupone
2024-09-29 17:00 ` Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox