Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646536 - sys-apps/kexec-tools: -mfunction-return=thunk and ‘-mcmodel=large’ are not compatible
Summary: sys-apps/kexec-tools: -mfunction-return=thunk and ‘-mcmodel=large’ are not co...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://gitweb.gentoo.org/repo/gentoo...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-04 01:36 UTC by Andrius Štikonas
Modified: 2020-05-03 19:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrius Štikonas 2018-02-04 01:36:22 UTC
kexec-tools-2.0.16 fails to compile here.

There was a similar fix for -mindirect-branch but it seems -mfunction-return was forgotten.

Reproducible: Always
Comment 1 François Thibault 2018-02-23 06:18:45 UTC
The thunk-inline version was made to work with '-mcmodel=large', so instead of filter-flags it could replace it with thunk-inline like this:

replace-flags -mfunction-return=thunk -mfunction-return=thunk-inline
replace-flags -mindirect-branch=thunk -mindirect-branch=thunk-inline

The only issue I see is that thunk-inline is slower than thunk.

At least it would be nice if the ebuilds did not filter thunk-inline (only thunk instead of thunk*) since that compiles.
Comment 2 Arfrever Frehtes Taifersar Arahesis 2019-08-27 07:37:32 UTC
Problem is hidden in >=sys-apps/kexec-tools-2.0.19 which just ignores user-specified CFLAGS during relevant part of building: bug #692930.
Comment 3 Larry the Git Cow gentoo-dev 2020-05-03 19:01:51 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b4aa565ce155f21bad4f3365268c7e7f3e370f23

commit b4aa565ce155f21bad4f3365268c7e7f3e370f23
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
AuthorDate: 2020-05-03 19:00:08 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-05-03 19:01:11 +0000

    sys-apps/kexec-tools: respect CFLAGS for purgatory
    
    Only when building purgatory, replace -mfunction-return=thunk and
    -mindirect-branch=thunk flags with similar -mfunction-return=thunk-inline
    and -mindirect-branch=thunk-inline flags, which are not incompatible
    with flags added by build system.
    
    Closes: https://bugs.gentoo.org/646536
    Closes: https://bugs.gentoo.org/692930
    Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
    Package-Manager: Portage-2.3.99, Repoman-2.3.22
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 sys-apps/kexec-tools/kexec-tools-2.0.20-r1.ebuild | 24 +++++++++++++++++--
 sys-apps/kexec-tools/kexec-tools-9999.ebuild      | 28 +++++++++++++++++++----
 2 files changed, 46 insertions(+), 6 deletions(-)