From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2E0FA158232 for ; Mon, 9 Dec 2024 05:51:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 85181E0BD3; Mon, 9 Dec 2024 05:51:05 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 0263EE0A60 for ; Mon, 9 Dec 2024 05:51:05 +0000 (UTC) From: Sam James To: Hans de Graaff Cc: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] ruby-fakegem.eclass: compile ruby31 extensions with gnu17 In-Reply-To: <20241208105354.26044-1-graaff@gentoo.org> (Hans de Graaff's message of "Sun, 8 Dec 2024 11:53:54 +0100") Organization: Gentoo References: <20241208105354.26044-1-graaff@gentoo.org> User-Agent: mu4e 1.12.7; emacs 31.0.50 Date: Mon, 09 Dec 2024 05:51:01 +0000 Message-ID: <87y10ppfp6.fsf@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail 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: cb84cb32-390d-4caf-be94-b3b042c74788 X-Archives-Hash: badbb1d35ef1ff31b085ce55c0869742 Hans de Graaff writes: > The varargs implementation in Ruby 3.2 is not compatible with gnu23. Ruby > 3.1 is in security maintenance mode upstream so it is unlikely that the > fixes from Ruby 3.2 will be backported. Ruby 3.1 is EOL in March 2025 > and will be removed from Gentoo around that time. > LGTM if you've confirmed it fixes an extension build. Add a Closes tag for https://bugs.gentoo.org/943988? > Signed-off-by: Hans de Graaff > --- > eclass/ruby-fakegem.eclass | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/eclass/ruby-fakegem.eclass b/eclass/ruby-fakegem.eclass > index eb6257a50cf9..fc78428be714 100644 > --- a/eclass/ruby-fakegem.eclass > +++ b/eclass/ruby-fakegem.eclass > @@ -23,6 +23,8 @@ case ${EAPI} in > *) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;; > esac > > +# flag-o-matic is only required for ruby31 support. > +inherit flag-o-matic > inherit ruby-ng > > # @ECLASS_VARIABLE: RUBY_FAKEGEM_NAME > @@ -424,6 +426,16 @@ EOF > each_fakegem_configure() { > debug-print-function ${FUNCNAME} "$@" > > + # Ruby 3.1 has a varargs implementation that is not compatible with > + # gnu23. Ruby 3.1 is EOL in March 2025 and will be removed shortly > + # after that. > + case ${RUBY} in > + *ruby31) > + append-flags -std=gnu17 > + filter-flags -std=gnu23 > + ;; > + esac > + > tc-export PKG_CONFIG > for extension in "${RUBY_FAKEGEM_EXTENSIONS[@]}" ; do > CC=$(tc-getCC) ${RUBY} --disable=did_you_mean -C ${extension%/*} ${extension##*/} --with-cflags="${CFLAGS}" --with-ldflags="${LDFLAGS}" ${RUBY_FAKEGEM_EXTENSION_OPTIONS} || die