Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 888727 - sys-kernel/gentoo-sources: does not apply the patch "5010_enable-cpu-optimizations-universal.patch"
Summary: sys-kernel/gentoo-sources: does not apply the patch "5010_enable-cpu-optimiza...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Kernel Bug Wranglers and Kernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-12-28 11:54 UTC by Juan Simón
Modified: 2022-12-29 17:33 UTC (History)
0 users

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 Juan Simón 2022-12-28 11:54:11 UTC
$ cat /etc/portage/package.use/packages.use
sys-kernel/gentoo-sources experimental
...

$ ls -l /etc/portage/make.profile
lrwxrwxrwx 1 root root 73 Dec 26 03:40 /etc/portage/make.profile -> ../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1/systemd/clang/

When I install the "gentoo-sources" package, it doesn't apply the patch "5010_enable-cpu-optimizations-universal.patch":

$ grep universal /var/log/portage/sys-kernel:gentoo-sources-6.1.1:20221228-102602.log
 * Excluding Patch #5010_enable-cpu-optimizations-universal.patch ...
 * Excluding Patch #5010_enable-cpu-optimizations-universal.patch ...
 * Excluding Patch #5010_enable-cpu-optimizations-universal.patch ...


Reproducible: Always

Actual Results:  
It doesn't apply the patch "5010_enable-cpu-optimizations-universal.patch"

Expected Results:  
It should apply the patch as it is valid for Clang (I guess that's why universal).

Tested with stable (5.15.80) and last version (6.1.1).
Comment 1 Mike Pagano gentoo-dev 2022-12-28 15:32:00 UTC
Can you give add :

ECLASS_DEBUG_OUTPUT=on

to your make.conf and then attach the full log ?
Comment 2 Mike Pagano gentoo-dev 2022-12-28 15:33:03 UTC
Never mind, yeah it's clangyear
Comment 3 Juan Simón 2022-12-28 17:34:56 UTC
More info: https://forums.gentoo.org/viewtopic-t-1160159-highlight-.html

It seems the problem is:
....
            local GCC_MAJOR_VER=$(gcc-major-version)
# ...
                if [[ ${GCC_MAJOR_VER} -lt 9 ]]; then
                    UNIPATCH_DROP+=" 5010_enable-cpu-optimizations-universal.patch"
Comment 4 Mike Pagano gentoo-dev 2022-12-28 17:59:56 UTC
(In reply to Juan Simón from comment #3)
> More info: https://forums.gentoo.org/viewtopic-t-1160159-highlight-.html
> 
> It seems the problem is:
> ....
>             local GCC_MAJOR_VER=$(gcc-major-version)
> # ...
>                 if [[ ${GCC_MAJOR_VER} -lt 9 ]]; then
>                     UNIPATCH_DROP+="
> 5010_enable-cpu-optimizations-universal.patch"

yes thank-you. Got it
Comment 5 Larry the Git Cow gentoo-dev 2022-12-29 17:33:14 UTC
The bug has been closed via the following commit(s):

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

commit 81ef4172f6f37839efbedebc4de8d52b419b72a3
Author:     Mike Pagano <mpagano@gentoo.org>
AuthorDate: 2022-12-29 17:32:13 +0000
Commit:     Mike Pagano <mpagano@gentoo.org>
CommitDate: 2022-12-29 17:32:13 +0000

    kernel-2.eclass: Don't drop CPU OPT patch when CC=clang
    
    Clang is supported by the CPU optimization patch. (USE=experimental)
    Check for CC=clang and do not drop this patch.
    
    Closes: https://bugs.gentoo.org/888727
    
    Signed-off-by: Mike Pagano <mpagano@gentoo.org>

 eclass/kernel-2.eclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)