Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Frage an Compiler-Experten
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) Diskussionsforum
View previous topic :: View next topic  
Author Message
andi_s
Apprentice
Apprentice


Joined: 10 Feb 2005
Posts: 183
Location: Germany

PostPosted: Tue Jun 07, 2011 9:44 am    Post subject: Frage an Compiler-Experten Reply with quote

Hallo,

ich baue auf meinem amd64 System so einen Kernel für ARM:

Code:

export ARCH=arm
export CROSS_COMPILE=~/toolchain/arm-eabi-4.4.0/bin/arm-eabi-
make


Das funktioniert auch wunderbar, allerdings gibt es ja diverse ARM-Varianten, daher möchte ich eine optimierte Version (armv7) kompilieren und evtl. auch mit -O3 kompilieren.

ich habe es daher so versucht:
Code:

export CFLAGS="-march=armv7 -O3"


allerdings war nach

Code:

make clean
make


das erzeugte Image identisch (Dateigröße)

Was mache ich falsch oder was fehlt und gibt es evtl. irgendeine Möglichkeit zu prüfen mit welchen Parametern CC beim Kompilieren ausgeführt wird?

Danke
Back to top
View user's profile Send private message
Josef.95
Veteran
Veteran


Joined: 03 Sep 2007
Posts: 1752
Location: Germany

PostPosted: Tue Jun 07, 2011 9:11 pm    Post subject: Reply with quote

Da gab es mal einen Tipp im guten alten de.gentoo-wiki.com
Ich poste hier einfach mal ein Zitat:
Wiki Kernel_manuell_kompilieren Artikel wrote:
Tuning (CFLAGS)
Leider werden beim Kernelbau bzw. make-Vorgang die CFLAGS / CXXFLAGS und LDFLAGS etc. der /etc/make.conf nicht beachtet, diese können aber in das Makefile des Kernels eingetragen werden.
Man sollte ausdrücklich nur sichere Optionen verwenden, speziell bei den LDFLAGS.
In der /usr/src/linux/Makefile (ca. um Zeile 217) die Variable HOSTCFLAGS evtl. auch HOSTCXXFLAGS beliebig anpassen (-Wl,* = LDFLAGS), zum Beispiel:

Datei: /usr/src/linux/Makefile
Code:
[...]
HOSTCFLAGS = -Wl,-O1 -Wl,--sort-common -march=prescott -pipe -fomit-frame-pointer -fno-ident -Wall -Wstrict-prototypes
HOSTCXXFLAGS = ${HOSTCFLAGS} -fvisibility-inlines-hidden
[...]

Die Beachtung der LDFLAGS ist nicht sicher, da das Linken an bestimmten Stellen fern der GCC durchgeführt wird.
Back to top
View user's profile Send private message
andi_s
Apprentice
Apprentice


Joined: 10 Feb 2005
Posts: 183
Location: Germany

PostPosted: Thu Jun 09, 2011 7:32 am    Post subject: Reply with quote

Hi,

danke für die Antwort - das sah nach einer Lösung aus, allerdings ist nach dem Anpassen des Makefiles das erzeugte Image immer noch identisch, d.h. die Optionen werden scheinbar ignoriert.

Ich denke das liegt irgendwie an der Toolchain.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum 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