Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

CFLAGS Central (Part 1)

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Locked
Advanced search
920 posts
  • Page 1 of 37
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 37
  • Next
Author
Message
AutoBot
l33t
l33t
User avatar
Posts: 968
Joined: Mon Apr 22, 2002 7:04 am
Location: Usually Out

CFLAGS Central (Part 1)

Post by AutoBot » Fri Jun 21, 2002 2:18 pm

I was just curious as to what everyone is using for there CFLAGS, and have you had any issues from them, stability problems, random crashes, etc...etc...

My system was compiled with the following and I have had no problems arise yet:

Code: Select all

CFLAGS="-march=i686 -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-loop-opt -frerun-cse-after-loop -falign-functions=4"
[edited only to change thread title - rac]
Last edited by AutoBot on Mon Aug 19, 2002 1:01 am, edited 1 time in total.
This message self destructed a long time ago.
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 2:37 pm

I have P2 300 Mhz 256 RAM and my CFLAGS are:
# Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon optimized (but binaries
# will run on any x86 system)
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe"
CXXFLAGS="-mcpu=i686 -O3 -pipe"

My system is a little slow...do you thing your flags can make my system faster?
All for one and one for All
--

MACPRO machine...
Top
delta407
Bodhisattva
Bodhisattva
User avatar
Posts: 2876
Joined: Tue Apr 23, 2002 12:16 am
Location: Chicago, IL
Contact:
Contact delta407
Website

Post by delta407 » Fri Jun 21, 2002 2:39 pm

I'm very stable with -mcpu=i686 -O3 -pipe -fomit-frame-pointer, and quite happy with the performance. :D
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 2:40 pm

what computer?
All for one and one for All
--

MACPRO machine...
Top
delta407
Bodhisattva
Bodhisattva
User avatar
Posts: 2876
Joined: Tue Apr 23, 2002 12:16 am
Location: Chicago, IL
Contact:
Contact delta407
Website

Post by delta407 » Fri Jun 21, 2002 2:43 pm

That's my desktop. Production servers running Gentoo are equally conservative, though, and have good uptimes (i.e. reboot only for new kernels every 6 weeks or so).
Top
S_aIN_t
Guru
Guru
User avatar
Posts: 488
Joined: Sat May 11, 2002 12:59 pm
Location: Ottawa
Contact:
Contact S_aIN_t
Website

Post by S_aIN_t » Fri Jun 21, 2002 2:43 pm

hmm. those are some interesting options.. thanks AutoBot.. i will try to rebuild my system with the flags you are using..

hopefully nothing will break..

i am also considering installing gcc-3.1 and rebuilding with that.. but that is another day.
Top
AutoBot
l33t
l33t
User avatar
Posts: 968
Joined: Mon Apr 22, 2002 7:04 am
Location: Usually Out

Post by AutoBot » Fri Jun 21, 2002 2:47 pm

That was the reason I started this thread, to give people an idea of what flags can be used without breaking things :)
Last edited by AutoBot on Fri Jun 21, 2002 2:49 pm, edited 1 time in total.
This message self destructed a long time ago.
Top
AutoBot
l33t
l33t
User avatar
Posts: 968
Joined: Mon Apr 22, 2002 7:04 am
Location: Usually Out

Post by AutoBot » Fri Jun 21, 2002 2:48 pm

pacman wrote:I have P2 300 Mhz 256 RAM and my CFLAGS are:
# Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon optimized (but binaries
# will run on any x86 system)
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe"
CXXFLAGS="-mcpu=i686 -O3 -pipe"

My system is a little slow...do you thing your flags can make my system faster?
You would gain some speed for sure by adding:

Code: Select all

-fomit-frame-pointer
This message self destructed a long time ago.
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 2:50 pm

AutoBot wrote:
pacman wrote:I have P2 300 Mhz 256 RAM and my CFLAGS are:
# Pentium Pro/Pentium II/Pentium III+/Pentium 4/Athlon optimized (but binaries
# will run on any x86 system)
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe"
CXXFLAGS="-mcpu=i686 -O3 -pipe"

My system is a little slow...do you thing your flags can make my system faster?
You would gain some speed for sure by adding:

Code: Select all

-fomit-frame-pointer
Like that?

CHOST="i686-pc-linux-gnu -fomit-frame-pointer"
CFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer"
All for one and one for All
--

MACPRO machine...
Top
delta407
Bodhisattva
Bodhisattva
User avatar
Posts: 2876
Joined: Tue Apr 23, 2002 12:16 am
Location: Chicago, IL
Contact:
Contact delta407
Website

Post by delta407 » Fri Jun 21, 2002 2:55 pm

No, see, you don't put optimizations in your CHOST line...
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 2:57 pm

delta407 wrote:No, see, you don't put optimizations in your CHOST line...
As you said i have no clue of those flags so it seems to be:
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer"

How it can help my P2?

Or i can use?
CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe"
CXXFLAGS="-mcpu=i686 -O3 -pipe"

Help :-)
All for one and one for All
--

MACPRO machine...
Top
delta407
Bodhisattva
Bodhisattva
User avatar
Posts: 2876
Joined: Tue Apr 23, 2002 12:16 am
Location: Chicago, IL
Contact:
Contact delta407
Website

Post by delta407 » Fri Jun 21, 2002 3:00 pm

Optimizations go on the CFLAGS/CXXFLAGS lines. BTW, -fomit-frame-pointer frees up an extra register, which gives the processor more room to play with numbers without having to touch the RAM. This gives many apps a big performance increase.
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 3:03 pm

Now I'm really confused because of you :-)

CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe"
CXXFLAGS="-mcpu=i686 -O3 -pipe"


make my day :p
All for one and one for All
--

MACPRO machine...
Top
AutoBot
l33t
l33t
User avatar
Posts: 968
Joined: Mon Apr 22, 2002 7:04 am
Location: Usually Out

Post by AutoBot » Fri Jun 21, 2002 3:08 pm

pacman wrote:Now I'm really confused because of you :-)

CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer"

CHOST="i686-pc-linux-gnu"
CFLAGS="-mcpu=i686 -O3 -pipe"
CXXFLAGS="-mcpu=i686 -O3 -pipe"


make my day :p
This is correct pacman:

Code: Select all

CHOST="i686-pc-linux-gnu" 
CFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer" 
CXXFLAGS="-mcpu=i686 -O3 -pipe -fomit-frame-pointer"
And if you want to recompile your entire system do the following:

Code: Select all

emerge gentoolkit  #only if you dont currently have it
qpkg -nc -I | sort | uniq | NOCOLOR=true xargs emerge 2>&1 >qpkg-make.log
This message self destructed a long time ago.
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 3:12 pm

Please lemme know what this line does :-)

qpkg -nc -I | sort | uniq | NOCOLOR=true xargs emerge 2>&1 >qpkg-make.log
All for one and one for All
--

MACPRO machine...
Top
AutoBot
l33t
l33t
User avatar
Posts: 968
Joined: Mon Apr 22, 2002 7:04 am
Location: Usually Out

Post by AutoBot » Fri Jun 21, 2002 3:18 pm

Recompiles your entire system with the new flags you have set in /etc/make.conf ;)
This message self destructed a long time ago.
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 3:21 pm

Code: Select all

emerge gentoolkit  #only if you dont currently have it 
qpkg -nc -I | sort | uniq | NOCOLOR=true xargs emerge 2>&1 >qpkg-make.log
Really? Then "emerge -e world" does what?
How long it can take?
All for one and one for All
--

MACPRO machine...
Top
AutoBot
l33t
l33t
User avatar
Posts: 968
Joined: Mon Apr 22, 2002 7:04 am
Location: Usually Out

Post by AutoBot » Fri Jun 21, 2002 3:27 pm

Ah it would appear with the new portage that emerge -e world does indeed work correctly now, so disreguard and use it instead.
This message self destructed a long time ago.
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 3:29 pm

Now , after I know that i need to run "emerge -e world", how long it will take?
All for one and one for All
--

MACPRO machine...
Top
AutoBot
l33t
l33t
User avatar
Posts: 968
Joined: Mon Apr 22, 2002 7:04 am
Location: Usually Out

Post by AutoBot » Fri Jun 21, 2002 3:38 pm

If you have KDE installed (I know you do), well over 24hours judging by your processor.

Code: Select all

time emerge -e world
#let me know how it goes :D
This message self destructed a long time ago.
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 3:40 pm

24 Hours?
You wanna my girlfriend to kill me? :-)
All for one and one for All
--

MACPRO machine...
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 3:45 pm

AutoBot wrote:If you have KDE installed (I know you do), well over 24hours judging by your processor.

Code: Select all

time emerge -e world
#let me know how it goes :D

Code: Select all

I entered "emerge -e world" without the "p" flag and it already started to grab source from net :-)

# time emerge -pe world

These are the packages that I would merge, in order.

Calculating world dependencies ...done!
[ebuild  N   ] sys-apps/cronbase-0.01 to /
[ebuild  N   ] sys-apps/groff-1.17.2-r1 to /
...
... to long...
...
[ebuild  N   ] dev-util/cscope-15.3 to /
[ebuild  N   ] app-editors/vim-6.1-r7 to /


real    0m30.437s
user    0m11.241s
sys     0m0.154s
Last edited by DArtagnan on Fri Jun 21, 2002 3:54 pm, edited 1 time in total.
All for one and one for All
--

MACPRO machine...
Top
AutoBot
l33t
l33t
User avatar
Posts: 968
Joined: Mon Apr 22, 2002 7:04 am
Location: Usually Out

Post by AutoBot » Fri Jun 21, 2002 3:52 pm

Lol I meant let me know how it goes after you re-compile everything.
This message self destructed a long time ago.
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 3:53 pm

Ma man ,
I'll kick your ass but u're lucky cuz i like ya :-)
Ok, I'll tell ya
All for one and one for All
--

MACPRO machine...
Top
DArtagnan
l33t
l33t
User avatar
Posts: 942
Joined: Tue Apr 30, 2002 11:23 am
Location: Israel, Jerusalem
Contact:
Contact DArtagnan
Website

Post by DArtagnan » Fri Jun 21, 2002 3:59 pm

pacman wrote:24 Hours?
You wanna my girlfriend to kill me? :-)
I promised her that I'll finish as fast as possible to re-compile every thing...:-)
What is more difficult? Gentoo or your woman?
All for one and one for All
--

MACPRO machine...
Top
Locked

920 posts
  • Page 1 of 37
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 37
  • Next

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic