Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


  Search this Thread
Old 11-19-2002, 04:01 AM   #1
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, 05:53 AM   #2
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 68
As quoted from the LFS Optimization hint:
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>" &&
To read the full hint, you'll need to download it from a mirror:

Since the main site is down for now.

Old 11-19-2002, 06:25 AM   #3
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.


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 05:00 AM
GCC 3.4/3.3 Optimization Flags monohouse Linux - Software 0 10-28-2004 10:48 AM
gcc optimization flags: rules of thumb elyk Linux - Software 3 08-04-2004 11:49 PM
gcc Pentium3 flags in menuconfig Kristian2 Slackware - Installation 2 06-11-2004 09:49 AM
something wrong with gcc freemind Linux - Newbie 18 04-30-2003 08:12 PM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:53 PM.

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