Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]gentoo-sources with experimental omits grasky2 patch
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
simonbcn
n00b
n00b


Joined: 01 Aug 2011
Posts: 69
Location: Denmark

PostPosted: Wed Dec 28, 2022 11:15 am    Post subject: [SOLVED]gentoo-sources with experimental omits grasky2 patch Reply with quote

I am installing Gentoo in a virtual machine.
Active profile is: /etc/portage/make.profile -> ../../var/db/repos/gentoo/profiles/default/linux/amd64/17.1/systemd/clang/

The "problem" is that when I install gentoo-sources with USE "experimental", the graysky2 kernel_compiler_patch patch to allow compiling the kernel with march=native should be applied and it is not doing it.
These are the options shown for "Processor family".
I have tested with both the stable kernel version (5.15.80) and the latest available (6.1.1).


Last edited by simonbcn on Wed Dec 28, 2022 12:45 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54300
Location: 56N 3W

PostPosted: Wed Dec 28, 2022 11:22 am    Post subject: Reply with quote

simonbcn,

Feel free to add the patch yourself.

If it breaks, you can keep all the pieces. Its your Gentoo your way.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
simonbcn
n00b
n00b


Joined: 01 Aug 2011
Posts: 69
Location: Denmark

PostPosted: Wed Dec 28, 2022 12:44 pm    Post subject: Reply with quote

Thanks. I just did it. In this way, which I didn't know, it is very easy to apply a patch like this and it works.
Anyway, I have created a bug report because this patch should be applied even if the compiler is Clang: https://bugs.gentoo.org/888727
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21708

PostPosted: Wed Dec 28, 2022 1:46 pm    Post subject: Reply with quote

It looks like the patch can be dropped for a few different cases. In my opinion, the most likely reason is that your gcc-major-version reports less than 9:
Code:
            local GCC_MAJOR_VER=$(gcc-major-version)
# ...
                if [[ ${GCC_MAJOR_VER} -lt 9 ]]; then
                    UNIPATCH_DROP+=" 5010_enable-cpu-optimizations-universal.patch"
What value does GCC_MAJOR_VER receive on your system?
Back to top
View user's profile Send private message
simonbcn
n00b
n00b


Joined: 01 Aug 2011
Posts: 69
Location: Denmark

PostPosted: Wed Dec 28, 2022 1:51 pm    Post subject: Reply with quote

Hu wrote:
It looks like the patch can be dropped for a few different cases. In my opinion, the most likely reason is that your gcc-major-version reports less than 9:
Code:
            local GCC_MAJOR_VER=$(gcc-major-version)
# ...
                if [[ ${GCC_MAJOR_VER} -lt 9 ]]; then
                    UNIPATCH_DROP+=" 5010_enable-cpu-optimizations-universal.patch"
What value does GCC_MAJOR_VER receive on your system?


Code:
$ gcc --version
gcc (Gentoo 11.3.1_p20221209 p3) 11.3.1 20221209
...
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 21708

PostPosted: Wed Dec 28, 2022 2:20 pm    Post subject: Reply with quote

That is not what I asked. I want to know what value that variable has. Its value is a function of eclass/toolchain-funcs.eclass:gcc-major-version. That is a function of eclass/toolchain-funcs.eclass:_gcc_fullversion. That depends on the output of tc-getCPP processing __GNUC__. If you provide emerge --info for this package, I can try to extrapolate the value. If I had to guess, you set CC=clang somewhere, and clang has a known issue that it claims to be gcc-4:
Code:
$ echo __GNUC__ | clang -E -x c -
# 1 "<stdin>"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 361 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "<stdin>" 2
4
4 is less than 9, so this check would trigger. Arguably, the toolchain-funcs test ought to verify that CC is actually gcc before trusting that __GNUC__ is sane.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum