public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
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
Date: Sun, 29 Sep 2024 18:00:37 +0100	[thread overview]
Message-ID: <874j5yqtsa.fsf@gentoo.org> (raw)
In-Reply-To: <20240929154444.62742717@alfredo.tupone.it> (Alfredo Tupone's message of "Sun, 29 Sep 2024 15:44:44 +0200")

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.


      reply	other threads:[~2024-09-29 17:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874j5yqtsa.fsf@gentoo.org \
    --to=sam@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=tupone@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox