Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Dobór CFLAGS
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Instalacja i sprzęt
View previous topic :: View next topic  
Author Message
Pryka
l33t
l33t


Joined: 08 Jun 2007
Posts: 658
Location: /dev/null

PostPosted: Tue Nov 13, 2007 3:07 pm    Post subject: [SOLVED]Dobór CFLAGS Reply with quote

Witam, dzisiaj posiedziałem sobie na forum i zagłębiłem się w archiwa :P

I teraz mam kilka pytań, chyba nie zbyt korzystnie mam ustawione CFLAGS

Mam AthlonaXP Socket A
wygląda to u mnie tak
Code:
CFLAGS="-O2 -march=i686 -pipe"


Czytałem trochę "man gcc", ale przywraca mnie o zawrót głowy nie znam się zbytnio na tym, jakie flagi a jakie nie by mi się przydały. Więc zwracam się do was o pomoc jak powinno wyglądać CFLAGS dla AthlonaXP 2400+


Last edited by Pryka on Wed Nov 14, 2007 8:41 am; edited 1 time in total
Back to top
View user's profile Send private message
wuja
Guru
Guru


Joined: 16 Jan 2005
Posts: 323
Location: Szczecin

PostPosted: Tue Nov 13, 2007 3:19 pm    Post subject: Reply with quote

Można np. tak:
Code:
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"

_________________
Pozdrowienia
Wojtek
www.wojciechgracz.pl
Back to top
View user's profile Send private message
Pryka
l33t
l33t


Joined: 08 Jun 2007
Posts: 658
Location: /dev/null

PostPosted: Tue Nov 13, 2007 3:26 pm    Post subject: Reply with quote

ok dzięki rozumiem, że to takie w miarę uniwersalne rozwiązanie :P

Jeżeli już bym się zdecydował na to co podałeś to muszę zmieniać coś w CHOST ??

I rozumiem, że czeka mnie emerge -e world ?? Czy mogę spokojnie pracować i kompilować nowe elementy systemu bez rekompilacji z nowym CFLAGS ??



BTW co daje ten
Code:
-fomit-frame-pointer
Bo za nim się dokopie w man gcc to wieki miną :P A w googlach nic nie widzę na ten temat.



ps. I w ogóle na jakiej zasadzie wy dobieracie te flagi bo nie za bardzo nie rozumiem tego mechanizmu
Back to top
View user's profile Send private message
pancurski
Guru
Guru


Joined: 15 Sep 2005
Posts: 495
Location: Lublin, Poland / Slough, UK

PostPosted: Tue Nov 13, 2007 5:08 pm    Post subject: Reply with quote

Chyba słabo przeglądałeś archiwa forum, było wiele topików na temat CFLAGS i ricerach :], jest jeszcze wiki, dokumentacja itp.
Co do CFLAGS to najlepiej miec Safe Flags :)
Back to top
View user's profile Send private message
Pryka
l33t
l33t


Joined: 08 Jun 2007
Posts: 658
Location: /dev/null

PostPosted: Tue Nov 13, 2007 5:14 pm    Post subject: Reply with quote

ok do gentoo wiki nie zajrzałem przyznaję :P znalazłem tam to co chciałem.


Powiedzcie mi tylko jeszcze, czy po zmianie CFLAGS koniecznie muszę rekompilować cały system ?? Czy też mogę to olać i normalnie aktualizować, pracować z nowym CFLAGS ?
Back to top
View user's profile Send private message
pancurski
Guru
Guru


Joined: 15 Sep 2005
Posts: 495
Location: Lublin, Poland / Slough, UK

PostPosted: Tue Nov 13, 2007 5:31 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-t-403254-highlight-zmiana+cflags.html
Back to top
View user's profile Send private message
Pryka
l33t
l33t


Joined: 08 Jun 2007
Posts: 658
Location: /dev/null

PostPosted: Tue Nov 13, 2007 5:45 pm    Post subject: Reply with quote

thx man :P
Back to top
View user's profile Send private message
Bialy
Guru
Guru


Joined: 20 Mar 2006
Posts: 486

PostPosted: Tue Nov 13, 2007 6:19 pm    Post subject: Reply with quote

wuja wrote:
Można np. tak:
Code:
CFLAGS="-march=athlon-xp -O2 -pipe -fomit-frame-pointer"


-fomit-frame-pointer nie jest dodawany sam?
Code:
man gcc
 -fomit-frame-pointer
           Don't keep the frame pointer in a register for functions that don't
           need one.  This avoids the instructions to save, set up and restore
           frame pointers; it also makes an extra register available in many
           functions.  It also makes debugging impossible on some machines.

           On some machines, such as the VAX, this flag has no effect, because
           the standard calling sequence automatically handles the frame
           pointer and nothing is saved by pretending it doesn't exist.  The
           machine-description macro "FRAME_POINTER_REQUIRED" controls whether
           a target machine supports this flag.

           Enabled at levels -O, -O2, -O3, -Os.
Back to top
View user's profile Send private message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 707
Location: \Poland\Krakow

PostPosted: Tue Nov 13, 2007 6:48 pm    Post subject: Reply with quote

Bialy -
Code:
-O also turns on -fomit-frame-pointer on machines where doing so does not interfere with debugging.

A na x86 -fomit-frame-pointer zakłóca debugging, więc automatycznie nie jest włączana :) na amd64 już jest :)
Back to top
View user's profile Send private message
Bialy
Guru
Guru


Joined: 20 Mar 2006
Posts: 486

PostPosted: Tue Nov 13, 2007 9:38 pm    Post subject: Reply with quote

n0rbi666 wrote:
Bialy -
Code:
-O also turns on -fomit-frame-pointer on machines where doing so does not interfere with debugging.

A na x86 -fomit-frame-pointer zakłóca debugging, więc automatycznie nie jest włączana :) na amd64 już jest :)

OK, a dla zwyklego usera po co debug kodu?
Back to top
View user's profile Send private message
n0rbi666
l33t
l33t


Joined: 04 Mar 2005
Posts: 707
Location: \Poland\Krakow

PostPosted: Wed Nov 14, 2007 10:31 am    Post subject: Reply with quote

Bialy - dla zwykłego usera po nic :) Dlatego -fomit-frame-pointer jest uważana za bezpieczną flagę :)
Back to top
View user's profile Send private message
Bialy
Guru
Guru


Joined: 20 Mar 2006
Posts: 486

PostPosted: Wed Nov 14, 2007 12:17 pm    Post subject: Reply with quote

n0rbi666 wrote:
Bialy - dla zwykłego usera po nic :) Dlatego -fomit-frame-pointer jest uważana za bezpieczną flagę :)

To dziwi mnie to ze na x86 nie jest default'owo wlaczone :(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Instalacja i sprzęt 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