View previous topic :: View next topic |
Author |
Message |
limes Tux's lil' helper
Joined: 18 Sep 2004 Posts: 129
|
Posted: Tue Sep 28, 2004 10:58 pm Post subject: gcc cflags und chost |
|
|
Hallo,
Bisher ging ich davon aus, daß das -march=cpu-type cflag gesetzt wird um gcc zu vermitteln auf welcher CPU-Architektur kompiliert wird (um gegebenenfalls effektiver zu arbeiten). Für welche Zielarchitektur kompiliert wird, so dachte ich, sei die CHOST Variable zuständig.
Dies wurde mir spätestens hier eindruckdsvoll widerlegt.
Außerdem: Installationanleitung wrote: | Das -march= Flag ... spezifiziert den Namen der Zielarchitektur. |
Installationanleitung additionally wrote: | Die CHOST Variable bestimmt, für welche Architektur der gcc die Programme übersetzt. |
Zwei Variablen - eine Meinung!?
1) Wenn schon -march=cpu-type den Code für die Zielarchitektur optimiert, wofür wird dann noch eine CHOST Variable gebraucht?
2) Was hat Priorität? Bekommt man mit
CFLAGS="-march=athlon-xp"
CHOST="i486-pc-linux-gnu"
athlon-xp, i486 oder etwa i686 optimierte Ergebnisse oder nur Brei?
wie sieht's hiermit aus?
CFLAGS="-march=i386"
CHOST="i686-pc-linux-gnu"
3) Hat die CHOST Variable überhaupt etwas mit gcc zu tun? (die ersten 20 google Treffer für 'gcc chost' standen alle in Verbindung mit gentoo, sogar die ersten Suchergebnisse auf gcc.gnu.org. Und im gcc-manual hab ich darüber nichts gefunden)
Wer oder was nutzt diese Variable? |
|
Back to top |
|
|
limes Tux's lil' helper
Joined: 18 Sep 2004 Posts: 129
|
Posted: Thu Sep 30, 2004 8:47 am Post subject: |
|
|
*ploink* |
|
Back to top |
|
|
Fauli l33t
Joined: 24 Apr 2004 Posts: 760 Location: Moers, Germany
|
Posted: Thu Sep 30, 2004 7:38 pm Post subject: |
|
|
Die CFLAGS werden zum Kompilieren an gcc übergeben und bestimmen, welche Assembler-Anweisungen generiert werden.
CHOST ist wichtig für autoconf, das damit das configure-Skript erzeugt. |
|
Back to top |
|
|
|
|
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
|
|