LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 11-19-2002, 05:01 AM   #1
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Rep: Reputation: 47
mplayer - wrong gcc flags


Just a quick one - how do I get mplayer to compile with the gcc flags I want? In my case it uses athlon for my duron CPU.I need to use athlon-tbird.
 
Old 11-19-2002, 06:53 AM   #2
MasterC
Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
As quoted from the LFS Optimization hint:
Quote:
There are a few ways to change the default compiler options. One way is to edit
every Makefile file you can find in a package, look for the CFLAGS and CXXFLAGS
variables (a well designed package uses the CFLAGS variable to define gcc
compiler options and CXXFLAGS to define g++ compiler options) and change their
values. Packages like binutils, gcc, glibc and others have a lot of Makefile
files in a lot of subdirectories so this would take a lot of time to do.
Instead there's an easier way to do things: create the CFLAGS and CXXFLAGS
environment variables. Most configure scripts read the CFLAGS and CXXFLAGS
variables and use them in the Makefile files. A few packages don't follow this
convention and those package require manual editing.

To set those variables you can do the following commands in bash (or in your
.bashrc if you want them to be there all the time):

export CFLAGS="-O3 -march=<architecture>" &&
CXXFLAGS=$CFLAGS
To read the full hint, you'll need to download it from a mirror:
ftp://ftp.planetmirror.com/pub/lfs/l...-hints.tar.bz2

Since the main site is down for now.

Cool
 
Old 11-19-2002, 07:25 AM   #3
crashmeister
Senior Member
 
Registered: Feb 2002
Distribution: t2 - trying to anyway
Posts: 2,541

Original Poster
Rep: Reputation: 47
Thanks - I'll try that.Damned gcc 3.2 is driving me crazy.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
flags for compiling Xlib.h in gcc Maidros Programming 2 06-15-2005 06:00 AM
GCC 3.4/3.3 Optimization Flags monohouse Linux - Software 0 10-28-2004 11:48 AM
gcc optimization flags: rules of thumb elyk Linux - Software 3 08-05-2004 12:49 AM
gcc Pentium3 flags in menuconfig Kristian2 Slackware - Installation 2 06-11-2004 10:49 AM
something wrong with gcc freemind Linux - Newbie 18 04-30-2003 09:12 PM


All times are GMT -5. The time now is 11:35 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration