LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 06-07-2003, 11:08 AM   #1
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Rep: Reputation: 45
optimizing compilations for my hardware.


Hi. I'm running LFS 4.0. It has worked out quite well. But I didn't use any optimization flags during the compilations. How do I find out what optimization flags to use if I want to compile things? I did look at the man page of gcc, but that's an intimidating peace of documentation to say the least.
Will my software actually run faster when I compile it with optimization flags? And if so, how much faster will my software, in a typical case run?
I have AMD CPU running at 900 MHz. Does it matter what mobo I have? Hope I'm making sence. Bey.
 
Old 06-07-2003, 01:49 PM   #2
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591

Rep: Reputation: 32
Use CFLAGS & CXXFLAGS to change the defaults.
For instance I've used
CFLAGS=-O3 -march=athlon-xp
CXXFLAGS=-O3 -march=athlon-xp
The mobo type is rather not important. Above makes the gcc to produce the code for CPU and optimize it for the CPU architecture.
Some of the source package configs ignore these environment variables so I've changed them manually by editing configure scripts or Makefile files.
The only packages I've left with default settings were the ones clearly mentioned in LFS books as "working badly" when compiled with optimization.
 
Old 06-07-2003, 04:31 PM   #3
qanopus
Senior Member
 
Registered: Jul 2002
Location: New York
Distribution: Slackware
Posts: 1,358

Original Poster
Rep: Reputation: 45
Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
modify target name for further compilations... ParticleHunter Linux - Software 2 03-12-2005 11:36 AM
Many Compilations/Installations Fail Puta Madre Linux - Hardware 5 01-24-2005 03:52 PM
Strange Compilations Error with gcc 3.3.2 gamehack Debian 1 01-19-2004 09:19 AM
optimizing source code compilations... uriahk Linux - Software 1 08-22-2002 09:07 AM
Frustrated compilations ottolinux Linux - Newbie 3 09-10-2001 07:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration