Summary: | dev-util/strace-5.4 fails to build | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Patrick Lauer <patrick> |
Component: | Current packages | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 0xe2.0x9a.0x9b, asolokha, candrews, fabio.coatti, klaus.kusche, pageexec |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://github.com/strace/strace/issues/114 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Patrick Lauer
2019-11-30 06:52:25 UTC
I've having strange behavior trying to build this. CFLAGS unset / -O2 / -O2 -g: all builds fine -O2 -g0: fails (same error) -O2 -flto: fails I'd like to say it's a LTO issue but that -g0 fails is just strange (while debug symbols get stripped either way, I use -g0 system-wide to cancel out potential -g and have smaller files during building phase). Confirmed for
CFLAGS="-O2 -pipe -march=native -flto=4 -fuse-linker-plugin"
LDFLAGS="-O2 -flto=4"
Bisect revealed:
> 7e4c052fb29c6838b483d2c0adf9da45b3f01ee1 is the first bad commit
> commit 7e4c052fb29c6838b483d2c0adf9da45b3f01ee1
> Author: Eugene Syromyatnikov <evgsyr@gmail.com>
> Date: Fri Feb 23 23:24:40 2018 +0100
>
> Add support for per-mpers compiler settings
>
> As some very special architectures require a separate compiler
> in order to compile binaries for additional supported personalities,
> we have to introduce such support.
>
> * Makefile.am (mpers_CPPFLAGS): Move $(strace_CPPFLAGS) ...
> (mpers_sh_opts): ... here.
> (mpers-m%.stamp:): Use $(mpers_CC) instead of $(CC) for compiler,
> pass $(mpers_CC_FLAGS) in quotes as it might be empty or contain spaces.
> ($(mpers_m32_targets)): Add @CFLAGS_FOR_M32@ to mpers_CC_FLAGS, set
> mpers_CPPFLAGS and mpers_CC.
> ($(mpers_mx32_targets)): Add @CFLAGS_FOR_MX32@ to mpers_CC_FLAGS, set
> mpers_CPPFLAGS and mpers_CC.
> * bootstrap (m_upper): Derive uppercase personality name.
> Set CC for mpers Makefile.am, add @CFLAGS_FOR_{M32,MX32}@ to
> MPERS_CC_FLAGS definition.
> * configure.ac: Derive default values for
> {CC,CPP,CFLAGS,CPPFLAGS}_FOR_{M32,MX32} from the respective CC, CPP,
> CFLAGS, and CPPFLAGS values.
> * m4/mpers.m4 (AC_DEFUN([st_MPERS])): Use
> {CC,CPP,CFLAGS,CPPFLAGS}_FOR_<$1> as CC, CPP, CFLAGS, and CPPFLAGS,
> respectively. Enclose MPERS_CFLAGS in quotes in mpers.sh call. Provide
> information about compiler in the AC_CACHE_CHECK message.
> * tests/Makefile.am (CC): New variable.
>
> Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
>
> Makefile.am | 16 ++++++++++------
> bootstrap | 4 +++-
> configure.ac | 6 ++++++
> m4/mpers.m4 | 33 +++++++++++++++++++++++++++++----
> tests/Makefile.am | 1 +
> 5 files changed, 49 insertions(+), 11 deletions(-)
Fixed upstream but until next version it has a proposed workaround for 5.4 of: export CFLAGS_FOR_M32= CFLAGS_FOR_MX32= Which appears to work for me with proper flags being used (only needs to be set during configure phase). The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a306a8927c38add6a043238c426add96cc66fb7f commit a306a8927c38add6a043238c426add96cc66fb7f Author: Thomas Deutschmann <whissi@gentoo.org> AuthorDate: 2019-12-05 17:41:33 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-12-05 17:41:45 +0000 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@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(-) |