From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1127690-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 9E5CA138334
	for <garchives@archives.gentoo.org>; Thu,  5 Dec 2019 17:42:00 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id A7F2EE08CD;
	Thu,  5 Dec 2019 17:41:58 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 6FFE1E08CD
	for <gentoo-commits@lists.gentoo.org>; Thu,  5 Dec 2019 17:41:58 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 2F51634D501
	for <gentoo-commits@lists.gentoo.org>; Thu,  5 Dec 2019 17:41:57 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 25069778
	for <gentoo-commits@lists.gentoo.org>; Thu,  5 Dec 2019 17:41:55 +0000 (UTC)
From: "Thomas Deutschmann" <whissi@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, "Thomas Deutschmann" <whissi@gentoo.org>
Message-ID: <1575567705.a306a8927c38add6a043238c426add96cc66fb7f.whissi@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-util/strace/files/, dev-util/strace/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-util/strace/files/strace-5.4-fix-LTO-CFLAGS-handling.patch dev-util/strace/strace-5.4.ebuild
X-VCS-Directories: dev-util/strace/ dev-util/strace/files/
X-VCS-Committer: whissi
X-VCS-Committer-Name: Thomas Deutschmann
X-VCS-Revision: a306a8927c38add6a043238c426add96cc66fb7f
X-VCS-Branch: master
Date: Thu,  5 Dec 2019 17:41:55 +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: 0c575da4-3425-489a-8a47-7fc2ba7f99c1
X-Archives-Hash: 7b8324a7360a656a0d2b945c889d6a3b

commit:     a306a8927c38add6a043238c426add96cc66fb7f
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Thu Dec  5 17:41:33 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Thu Dec  5 17:41:45 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a306a892

dev-util/strace: do not copy CFLAGS to CFLAGS_FOR_{M32,MX32}

Closes: https://bugs.gentoo.org/701516
Package-Manager: Portage-2.3.80, Repoman-2.3.19
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 .../files/strace-5.4-fix-LTO-CFLAGS-handling.patch | 24 ++++++++++++++++++++++
 dev-util/strace/strace-5.4.ebuild                  |  8 +++++++-
 2 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/dev-util/strace/files/strace-5.4-fix-LTO-CFLAGS-handling.patch b/dev-util/strace/files/strace-5.4-fix-LTO-CFLAGS-handling.patch
new file mode 100644
index 00000000000..0f277962b95
--- /dev/null
+++ b/dev-util/strace/files/strace-5.4-fix-LTO-CFLAGS-handling.patch
@@ -0,0 +1,24 @@
+Based on 52ac53e96143f6aac52738f6e385f75203a68a7b
+[PATCH] configure.ac: do not copy CFLAGS to CFLAGS_FOR_{M32,MX32}
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -984,11 +984,14 @@ AS_IF([test x$arch = xaarch64],
+ 	     ])
+       ])
+ 
+-# Setting default compiler variables for personalities
++# Set default compiler variables for personalities.
+ m4_foreach([pers], [M32, MX32], dnl
+-	[m4_foreach([var], [CC, CPP, CFLAGS, CPPFLAGS], dnl
+-	[[: ${]var[_FOR_]pers[=$]var[}]
+-	AC_SUBST(var[_FOR_]pers)])])
++	   [m4_foreach([var], [CC, CPP, CPPFLAGS], dnl
++		       [[: ${]var[_FOR_]pers[=$]var[}]
++		        AC_SUBST(var[_FOR_]pers)]) dnl
++	    m4_foreach([var], [CFLAGS], dnl
++		       [[: ${]var[_FOR_]pers[=][}]
++		        AC_SUBST(var[_FOR_]pers)])])
+ 
+ st_MPERS([m32], [aarch64|powerpc64|s390x|sparc64|tile|x32|x86_64])
+ st_MPERS([mx32], [x86_64])

diff --git a/dev-util/strace/strace-5.4.ebuild b/dev-util/strace/strace-5.4.ebuild
index db378889c0d..31a56378b3f 100644
--- a/dev-util/strace/strace-5.4.ebuild
+++ b/dev-util/strace/strace-5.4.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=7
 
-inherit flag-o-matic toolchain-funcs
+inherit flag-o-matic toolchain-funcs autotools
 
 if [[ ${PV} == "9999" ]] ; then
 	EGIT_REPO_URI="https://github.com/strace/strace.git"
@@ -37,9 +37,15 @@ RDEPEND="
 	perl? ( dev-lang/perl )
 "
 
+PATCHES=( "${FILESDIR}"/${P}-fix-LTO-CFLAGS-handling.patch )
+
 src_prepare() {
 	default
 
+	# Needed for applied patch (#701516). Remove with next version.
+	# Don't forget about autotools inherit.
+	eautoreconf
+
 	if [[ ! -e configure ]] ; then
 		# git generation
 		sed /autoreconf/d -i bootstrap || die