Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931972 - sys-fs/mdadm-4.3 fails to compile: `Bad gcc [-Q --help=warnings] invocation`
Summary: sys-fs/mdadm-4.3 fails to compile: `Bad gcc [-Q --help=warnings] invocation`
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2024-05-15 21:21 UTC by gwendal grignou
Modified: 2025-02-13 12:00 UTC (History)
0 users

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


Attachments
emerge log (Screenshot from 2024-05-14 10-12-35.png,66.46 KB, image/png)
2024-05-15 21:21 UTC, gwendal grignou
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gwendal grignou 2024-05-15 21:21:48 UTC
Created attachment 893036 [details]
emerge log

Compiling mdadm for ChromeOS, using clang instead of gcc, emerging 4.2 and 4.3 fails with:

```
 * ERROR: sys-fs/mdadm-4.3::portage-stable failed (compile phase):
 *   Bad gcc [-Q --help=warnings] invocation
```

The issue has been introduced in mdadm with commit 8268821b434d ("mdadm: Add Wimplicit-fallthrough=0 in Makefile") added to mdadm-4.1.


It can be fixed by using `$(CXX)` instead of `gcc` directly.
Comment 1 Larry the Git Cow gentoo-dev 2025-02-13 11:34:28 UTC
The bug has been closed via the following commit(s):

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

commit edc702aee9685668ec277444e123613fbb1eb232
Author:     Gwendal Grignou <gwendal@chromium.org>
AuthorDate: 2024-05-15 21:49:16 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-13 11:31:08 +0000

    sys-fs/mdadm: Do not call gcc directly
    
    When gcc is not used (clang is used on Chromeos), emerge will fails.
    
    Closes: https://bugs.gentoo.org/931972
    Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
    Closes: https://github.com/gentoo/gentoo/pull/36691
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/mdadm-4.3-do-not-call-gcc-directly.patch | 50 ++++++++++++++++++++++
 sys-fs/mdadm/mdadm-4.3-r1.ebuild                   |  1 +
 2 files changed, 51 insertions(+)
Comment 2 Larry the Git Cow gentoo-dev 2025-02-13 12:00:44 UTC
The bug has been referenced in the following commit(s):

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

commit c7b820a2ed5261b815d262bca51e2bdf854bbdf1
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2025-02-13 12:00:04 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-02-13 12:00:04 +0000

    sys-fs/mdadm: add upstream link for GCC warnings patch
    
    Bug: https://bugs.gentoo.org/931972
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-fs/mdadm/files/mdadm-4.3-do-not-call-gcc-directly.patch | 3 +++
 1 file changed, 3 insertions(+)