From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev+bounces-102593-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 63AB715808B
	for <garchives@archives.gentoo.org>; Sun, 29 Sep 2024 17:00:46 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 1E5C3E2A2C;
	Sun, 29 Sep 2024 17:00:42 +0000 (UTC)
Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id D37C7E2A25
	for <gentoo-dev@lists.gentoo.org>; Sun, 29 Sep 2024 17:00:41 +0000 (UTC)
From: Sam James <sam@gentoo.org>
To: Alfredo Tupone <tupone@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org
Subject: Re: [gentoo-dev] Foreseen update to ada.eclass to allow use of
 gcc:14 and gcc:15
In-Reply-To: <20240929154444.62742717@alfredo.tupone.it> (Alfredo Tupone's
	message of "Sun, 29 Sep 2024 15:44:44 +0200")
Organization: Gentoo
References: <20240929154444.62742717@alfredo.tupone.it>
Date: Sun, 29 Sep 2024 18:00:37 +0100
Message-ID: <874j5yqtsa.fsf@gentoo.org>
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
Content-Type: text/plain
X-Archives-Salt: eb89d4ec-7850-48db-88ae-4674e693ddf3
X-Archives-Hash: d75bf5bd8dfb90d1650685b8f421b36e

Alfredo Tupone <tupone@gentoo.org> writes:

> 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}" ;;

Thank you! I think a use.mask will need to be committed for gcc_15 until
it is released, but I will be using it to test.