Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[gelöst] Kernel mit bestimmten GCC-Flags kompilieren
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
LinuxTom
l33t
l33t


Joined: 26 Mar 2006
Posts: 798

PostPosted: Sun Dec 22, 2013 2:39 pm    Post subject: [gelöst] Kernel mit bestimmten GCC-Flags kompilieren Reply with quote

Hi Leute,

ich verzweifele bald. Ich finde nicht herraus, wie ich meinen Kernel eine bestimmte GCC-Direktive zur Herstellung bei make mitgeben kann. Hierbei geht es um "-mno-movbe", da ich auf dem Zielsystem einen Atom habe jedoch den Kernel in KVM erzeuge (geht schneller) und KVM movbe noch nicht unterstützt.

Wo kann ich das einstellen?

Bei dem ganzen Rest dieses Gentoo-Systems hilft CFLAGS. Aber leider eben nicht beim Kernel, den ich nicht über genkernel erzeuge.


Last edited by LinuxTom on Sun Dec 22, 2013 4:43 pm; edited 1 time in total
Back to top
View user's profile Send private message
Christian99
Veteran
Veteran


Joined: 28 May 2009
Posts: 1668

PostPosted: Sun Dec 22, 2013 3:12 pm    Post subject: Reply with quote

ich hab mal gehört, dass es KC(PP)FLAGS gibt, aber ich hab das noch nie probiert. also selber vorher nochmal nachforschen.
Back to top
View user's profile Send private message
LinuxTom
l33t
l33t


Joined: 26 Mar 2006
Posts: 798

PostPosted: Sun Dec 22, 2013 3:55 pm    Post subject: Reply with quote

Ich glaube sys-kernel/genkernel scheint die Lösung zu werden. Mal probieren.
Code:
genkernel --splash --no-install --no-clean --kernel-cc="gcc -mno-movbe" --utils-cc="gcc -mno-movbe" --menuconfig all
Back to top
View user's profile Send private message
LinuxTom
l33t
l33t


Joined: 26 Mar 2006
Posts: 798

PostPosted: Sun Dec 22, 2013 4:43 pm    Post subject: Reply with quote

Ja, das ist die einfache Lösung. Jetzt muss ich nur schauen, was genkernel genau alles macht. System läuft. :D
Back to top
View user's profile Send private message
Child_of_Sun_24
Guru
Guru


Joined: 28 Jul 2004
Posts: 578

PostPosted: Thu Dec 26, 2013 11:38 am    Post subject: Reply with quote

Beim Linux Kernel werden die Cflags über das Makefile gesetzt /usr/src/linux/Makefile), die Varibel dafür heißt HOSTCCFLAGS .
Back to top
View user's profile Send private message
theotherjoe
Guru
Guru


Joined: 22 Nov 2003
Posts: 393

PostPosted: Sat Jan 18, 2014 11:02 am    Post subject: Reply with quote

Bin gerade auf deinen thread gestossen, LinuxTom.
Anbei mein vorgehen fuer die kernel compile flags:

in der datei ~/kernenv findet sich:
Code:
#export KCFLAGS="-march=amdfam10 -msse4a -O2 -pipe"
#export KCPPFLAGS="-march=amdfam10 -msse4a -O2 -pipe"
export KCFLAGS="-march=bdver2  -O2 -pipe"
export KCPPFLAGS="-march=bdver2 -O2 -pipe"


via source ~/kernenv werden den env variablen {ueber|(ge}schrieben.

ich habe die anweisung in der ~/.bash_profile:
Code:
if [ -e ~/kernenv ]; then
     source ~/kernenv
fi
Back to top
View user's profile Send private message
toralf
Developer
Developer


Joined: 01 Feb 2004
Posts: 3922
Location: Hamburg

PostPosted: Sat Jan 18, 2014 6:40 pm    Post subject: Reply with quote

LinuxTom wrote:
Jetzt muss ich nur schauen, was genkernel genau alles macht
supi, vllt. siehst Du dann auch eine Lösung für den (minor) Bug 426338 ;-)
Back to top
View user's profile Send private message
LinuxTom
l33t
l33t


Joined: 26 Mar 2006
Posts: 798

PostPosted: Mon Jan 20, 2014 10:05 am    Post subject: Reply with quote

Der Bug 426338 ist mir noch nicht aufgefallen, doch ich achte mal drauf.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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