LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   mplayer - wrong gcc flags (http://www.linuxquestions.org/questions/linux-software-2/mplayer-wrong-gcc-flags-35842/)

crashmeister 11-19-2002 05:01 AM

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.

MasterC 11-19-2002 06:53 AM

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

crashmeister 11-19-2002 07:25 AM

Thanks - I'll try that.Damned gcc 3.2 is driving me crazy.


All times are GMT -5. The time now is 06:08 PM.