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 16B42158232 for ; Sun, 8 Dec 2024 10:54:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0CFE1E08F0; Sun, 8 Dec 2024 10:53:59 +0000 (UTC) Received: from graaff.moving-innovations.com (graaff.connected.by.freedominter.net [45.137.101.13]) by pigeon.gentoo.org (Postfix) with ESMTP id 19855E0815 for ; Sun, 8 Dec 2024 10:53:57 +0000 (UTC) Received: by graaff.moving-innovations.com (Postfix, from userid 1000) id 1173A311E5F; Sun, 08 Dec 2024 11:53:57 +0100 (CET) From: Hans de Graaff To: gentoo-dev@lists.gentoo.org Cc: Hans de Graaff Subject: [gentoo-dev] [PATCH] ruby-fakegem.eclass: compile ruby31 extensions with gnu17 Date: Sun, 8 Dec 2024 11:53:54 +0100 Message-ID: <20241208105354.26044-1-graaff@gentoo.org> X-Mailer: git-send-email 2.45.2 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-Transfer-Encoding: 8bit X-Archives-Salt: 7bdf7376-5d81-4f89-aade-9eaf574e285b X-Archives-Hash: 0608ad8ffd9a97ccfa14d82e16087450 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. 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 -- 2.45.2