dev-util/strace: do not copy CFLAGS to CFLAGS_FOR_{M32,MX32}
authorThomas Deutschmann <whissi@gentoo.org>
Thu, 5 Dec 2019 17:41:33 +0000 (18:41 +0100)
committerThomas Deutschmann <whissi@gentoo.org>
Thu, 5 Dec 2019 17:41:45 +0000 (18:41 +0100)
Closes: https://bugs.gentoo.org/701516
Package-Manager: Portage-2.3.80, Repoman-2.3.19
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
dev-util/strace/files/strace-5.4-fix-LTO-CFLAGS-handling.patch [new file with mode: 0644]
dev-util/strace/strace-5.4.ebuild

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 (file)
index 0000000..0f27796
--- /dev/null
@@ -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])
index db378889c0d5635773642f49c10776f0d65ca34a..31a56378b3f84f5392ce3891c6568923ff795412 100644 (file)
@@ -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