From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1616659-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 26828158041
	for <garchives@archives.gentoo.org>; Tue,  2 Apr 2024 15:22:27 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 2B7A1E2A49;
	Tue,  2 Apr 2024 15:22:26 +0000 (UTC)
Received: from smtp.gentoo.org (mail.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 0CB4CE2A49
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Apr 2024 15:22:26 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(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 smtp.gentoo.org (Postfix) with ESMTPS id 3A5E734315F
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Apr 2024 15:22:25 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 8E563135F
	for <gentoo-commits@lists.gentoo.org>; Tue,  2 Apr 2024 15:22:23 +0000 (UTC)
From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" <mjo@gentoo.org>
Message-ID: <1712070580.7876a356f737310c0cdda056fb77ebcbab866f3d.mjo@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-mathematics/singular/files/, sci-mathematics/singular/
X-VCS-Repository: repo/gentoo
X-VCS-Files: sci-mathematics/singular/files/singular-4.3.2_p16-lto.patch sci-mathematics/singular/singular-4.3.2_p16.ebuild
X-VCS-Directories: sci-mathematics/singular/ sci-mathematics/singular/files/
X-VCS-Committer: mjo
X-VCS-Committer-Name: Michael Orlitzky
X-VCS-Revision: 7876a356f737310c0cdda056fb77ebcbab866f3d
X-VCS-Branch: master
Date: Tue,  2 Apr 2024 15:22:23 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: 626cf89e-ef76-491f-8936-11e881b4f947
X-Archives-Hash: 75140301407a34b12d33366ec6fb04ab

commit:     7876a356f737310c0cdda056fb77ebcbab866f3d
Author:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Apr  2 15:08:51 2024 +0000
Commit:     Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Tue Apr  2 15:09:40 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7876a356

sci-mathematics/singular: backport strict-aliasing/lto fix

Bug: https://bugs.gentoo.org/927675
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>

 .../singular/files/singular-4.3.2_p16-lto.patch        | 18 ++++++++++++++++++
 sci-mathematics/singular/singular-4.3.2_p16.ebuild     | 11 ++---------
 2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/sci-mathematics/singular/files/singular-4.3.2_p16-lto.patch b/sci-mathematics/singular/files/singular-4.3.2_p16-lto.patch
new file mode 100644
index 000000000000..a880f4ef5b12
--- /dev/null
+++ b/sci-mathematics/singular/files/singular-4.3.2_p16-lto.patch
@@ -0,0 +1,18 @@
+From 83a4e40c59dd99ff3131cbdb57b24b456aa04b93 Mon Sep 17 00:00:00 2001
+From: Hans Schoenemann <hannes@mathematik.uni-kl.de>
+Date: Tue, 2 Apr 2024 15:09:51 +0200
+Subject: [PATCH] countedref + https://github.com/Singular/Singular/issues/1212
+
+diff --git a/Singular/countedref.cc b/Singular/countedref.cc
+index d3b783ade7..f83d7fab62 100644
+--- a/Singular/countedref.cc
++++ b/Singular/countedref.cc
+@@ -108,7 +108,7 @@ class CountedRefData:
+   BOOLEAN put(leftv res) { return broken() || m_data.put(res);  }
+ 
+   /// Extract (shallow) copy of stored data
+-  LeftvShallow operator*() const { return (broken()? LeftvShallow(): (const LeftvShallow&)m_data); }
++  LeftvShallow operator*() { return (broken()? LeftvShallow(): LeftvShallow(m_data)); }
+ 
+   /// Determine active ring when ring dependency changes
+   BOOLEAN rering() {

diff --git a/sci-mathematics/singular/singular-4.3.2_p16.ebuild b/sci-mathematics/singular/singular-4.3.2_p16.ebuild
index 1b8fee9d38a1..94a83c7da0c8 100644
--- a/sci-mathematics/singular/singular-4.3.2_p16.ebuild
+++ b/sci-mathematics/singular/singular-4.3.2_p16.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=8
 
-inherit autotools elisp-common flag-o-matic
+inherit autotools elisp-common
 
 MY_PN=Singular
 MY_PV=$(ver_rs 3 '')
@@ -42,6 +42,7 @@ SITEFILE=60${PN}-gentoo.el
 
 PATCHES=(
 	"${FILESDIR}/${P}-test-underlinking.patch"
+	"${FILESDIR}/${P}-lto.patch"
 )
 
 src_prepare() {
@@ -50,14 +51,6 @@ src_prepare() {
 }
 
 src_configure() {
-	# -Werror=strict-aliasing
-	# https://bugs.gentoo.org/927675
-	# https://github.com/Singular/Singular/issues/1212
-	#
-	# Do not trust with LTO either.
-	append-flags -fno-strict-aliasing
-	filter-lto
-
 	local myconf=(
 		--disable-debug
 		--disable-doc