Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 932250 - >=sys-libs/glibc-2.39-r6 fails to setup as cross-glibc on arm64 host
Summary: >=sys-libs/glibc-2.39-r6 fails to setup as cross-glibc on arm64 host
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 934476 (view as bug list)
Depends on:
Blocks:
 
Reported: 2024-05-20 05:05 UTC by tt_1
Modified: 2024-06-24 01:28 UTC (History)
3 users (show)

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


Attachments
build log for cross-armv7a-glibc (build.log,2.35 KB, text/x-log)
2024-05-20 05:05 UTC, tt_1
Details
output from emerge --info (emerge-info,5.56 KB, text/plain)
2024-05-20 05:05 UTC, tt_1
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2024-05-20 05:05:26 UTC
Created attachment 893462 [details]
build log for cross-armv7a-glibc

So I've got an armv7a-unknown-linux-gnueabihf cross compiler set up within an existing aarch64-unknown-linux-gnu host, to cross compile for armv7a from that stronger aarch64 machine. I did the bootstrap with glibc-2.38-r13, and as I wanted to upgrade to the now stabilized glibc-2.39-r6, the cross-glibc fails with: 

 *   Manual CFLAGS:   -O2 -pipe
 * Checking general environment sanity.
armv7a-unknown-linux-gnueabihf-gcc: error: unrecognized command-line option ‘-mbranch-protection=none’; did you mean ‘-fcf-protection=none’?
 * Checking linux-headers version (0.0.0 >= 3.2.0) ...                                                                                                                           [ !! ]


the problem is here: https://github.com/gentoo/gentoo/blob/master/sys-libs/glibc/glibc-2.39-r6.ebuild#L528
Comment 1 tt_1 2024-05-20 05:05:56 UTC
Created attachment 893463 [details]
output from emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-20 07:05:31 UTC
Yeah, we need to check CTARGET here.
Comment 3 Steven Christenson 2024-06-18 16:00:20 UTC
I created a very similar bug when trying to do crossdev from arm64 to x86. Same problem occurs where the source arch is used instead of the target. 

This problem affects more then just this use case. 

My bug is 934476. I added this one to my See Also field.
Comment 4 Mike Gilbert gentoo-dev 2024-06-18 16:18:49 UTC
*** Bug 934476 has been marked as a duplicate of this bug. ***
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-18 16:22:02 UTC
Please don't CC arch teams. They're for stabilisation and keywording bugs.

Anyway, the problem is clear. One of us will handle it when we get a chance.
Comment 6 Larry the Git Cow gentoo-dev 2024-06-24 01:28:01 UTC
The bug has been closed via the following commit(s):

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

commit 8a2668b938264825869a7a0c6c7ac0799156cf96
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-06-24 01:26:18 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-06-24 01:26:18 +0000

    sys-libs/glibc: pass -fcf-protection=none based on CTARGET
    
    Closes: https://bugs.gentoo.org/932250
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-libs/glibc/glibc-2.39-r6.ebuild | 13 ++++++++-----
 sys-libs/glibc/glibc-2.39-r7.ebuild | 13 ++++++++-----
 sys-libs/glibc/glibc-2.39-r9.ebuild | 13 ++++++++-----
 sys-libs/glibc/glibc-9999.ebuild    | 13 ++++++++-----
 4 files changed, 32 insertions(+), 20 deletions(-)