| Summary: | Compiler option "-fzero-call-used-regs=used" fails for openssh-9.6p1 during linking stage on qemuppc64 | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | William Lyu <william.lyu> |
| Component: | connectivity | Assignee: | William Lyu <william.lyu> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | meta.mr.watcher, meta.watcher, randy.macleod, sundeep.kokkonda, SunilKumar.Dora, tim.orling |
| Version: | unspecified | ||
| Target Milestone: | 5.3 | ||
| Hardware: | x86 | ||
| OS: | ppc64 | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Don't know | |
| Attachments: | |||
|
Description
William Lyu
2024-02-29 13:56:30 UTC
Created attachment 5019 [details]
"openssh-9.5p1_log.do_configure": log.do_configure generated for building openssh-9.5p1
Created attachment 5020 [details]
"openssh-9.5p1_log.do_compile": log.do_compile generated for building openssh-9.5p1
Created attachment 5021 [details]
"openssh-9.6p1_log.do_configure": log.do_configure generated for building openssh-9.6p1
Created attachment 5022 [details]
"openssh-9.6p1_log.do_compile": log.do_compile generated for building openssh-9.6p1
We saw issues with mips32 but they do not seem the same: https://lists.openembedded.org/g/openembedded-core/topic/103546397#194895 In this case it was fixed by turning off hardening: https://lists.openembedded.org/g/openembedded-core/topic/104381904#195704 It is not clear this is even slightly related. After adding the following line to the openssh recipe, I can build openssh package on ppc64el without issues: EXTRA_OECONF:append:powerpc64le = " --without-hardening" The patch disabling the compiler option is accepted by the upstream: https://git.openembedded.org/openembedded-core/commit/meta/recipes-connectivity/openssh/openssh_9.6p1.bb?id=bc793fa9d1fe24c102d91e97b7002b6e637cbfa5 I have built core-image-minimal (MACHINE=qemuppc64) on poky/master (b5624ee5643d881afa004571a096a189ab5389b5) with openssh and openssh-ptest. There are no build errors now. I have ran the ptest of openssh to completion and all tests passed. We have a workaround that suppresses the build error at the cost of potentially degraded security of this package. Reopening this bug to track the compiler bug that impacted the usage of compiler option "-fzero-call-used-regs". CC Sundeep in case William wants to hand the bug to him rather than have the pleasure of digging into the gcc code, email list, etc. William will look into this initially. Sunil, can you review this issue, before Thursday May 22? Please talk with William if needed and make a recommendation about whether we should keep this bug open or accept that we have to disabling the compiler option. Sure, Randy - I'm looking into this and will update the thread soon. The compiler option -fzero-call-used-regs=used fails during linking of openssh-9.6p1 on qemuppc64. This is a known GCC limitation for PowerPC architectures, as confirmed by: GCC test cases explicitly skipping these tests on PowerPC (https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=96fc91785ef1e4d52487e6b29787954d1df042a8). Expected error: unimplemented: argument 'used' is not supported for '-fzero-call-used-regs' on this target. Supported Architectures: GCC currently supports this flag(fzero-call-used-regs=used) only for: --------------------------- 32/64-bit x86 (i?86, x86_64) SPARC AArch64 NVIDIA PTX IBM s390 LoongArch64 OpenSSH Context: --------------- OpenSSH 9.6p1+: (From Release Notes) Improved detection of unstable flags (including -fzero-call-used-regs). Earlier versions (e.g., 9.5p1): May have "passed" due to weaker autoconf checks (To reconfirm). Upstream fixes: Focus on autoconf improvements, not compiler workarounds. Current Status: Workaround: --without-hardening (merged upstream, but reduces security). Root Cause: Architectural limitation in GCC’s PowerPC backend. ACCEPTED status retained (OE-Core cannot fix GCC limitations). Engagement with GCC: I am discussing with PowerPC maintainers to clarify future support feasibility. Updates will follow. Move to 5.3 based on Sunil's helpful comment and the fact that he is asking upstream if a fix is possible or likely. Reply from PowerPC maintainer: ----------------------------- If you look at the Git history, it was disabled on Darwin because of an "unimplemented, sorry" failure. Iain limited the testsuite change to Darwin, but the feature is not implemented in the PowerPC backend and there are no plans to implement it. Thanks, David Thanks Sunil. We have the work-around so I'm going to resolve the defect since William's work-around was accepted long ago: https://git.openembedded.org/openembedded-core/commit/meta/recipes-connectivity/openssh/openssh_9.6p1.bb?id=bc793fa9d1fe24c102d91e97b7002b6e637cbfa5 oe-core.git on master ❯ git branch -a --contains bc793fa9d1fe24c102d91e97b7002b6e637cbfa5 * master remotes/origin/HEAD -> origin/master remotes/origin/master remotes/origin/master-next remotes/origin/scarthgap remotes/origin/styhead remotes/origin/walnascar remotes/origin/walnascar-next |