I would like to compile an application from source, using compiler optimizations for my specific CPU. Searching the web hasn’t proved very useful and though I’ve found some information I still have many blank spots.
e.g I read about some CFLAGS and CXXFLAGS. But I don’t know if it should be used before or after ./configure or perhaps is done during ? as in
./configure --export CFLAGS=" - 03 march ?? "
Moreover I don’t know what options to specify other than “O” which if I’m correct is the optimization level, and “march” which I believe allows me to specify my CPU architecture.
if someone could perhaps point me to some article or tutorial or even some technical manual on the gcc compiler flags I’d be forever indebted.
The application I’m trying to compile is Wine. My system has an AMD AthlonX2 7850, an Nvidia 6150 chipset, a 9800GT video card and 4GB ddr2-800c of RAM.
>
> Hello there,
>
> I would like to compile an application from source, using compiler
> optimizations for my specific CPU. Searching the web hasn’t proved very
> useful and though I’ve found some information I still have many blank
> spots.
> e.g I read about some CFLAGS and CXXFLAGS. But I don’t know if it
> should be used before or after ./configure or perhaps is done during ?
> as in
> Code:
> --------------------
> ./configure --export CFLAGS=" - 03 march ?? "
> --------------------
>
> Moreover I don’t know what options to specify other than “O” which if
> I’m correct is the optimization level, and “march” which I believe
> allows me to specify my CPU architecture.
>
> if someone could perhaps point me to some article or tutorial or even
> some technical manual on the gcc compiler flags I’d be forever
> indebted.
> The application I’m trying to compile is Wine. My system has an AMD
> AthlonX2 7850, an Nvidia 6150 chipset, a 9800GT video card and 4GB
> ddr2-800c of RAM.
>
> Thank you very much.
>
>
> –
> Hanzdersion
> ------------------------------------------------------------------------
> Hanzdersion’s Profile: http://forums.opensuse.org/member.php?userid=42712
> View this thread: http://forums.opensuse.org/showthread.php?t=471325
>
>
In my, limited, experience of compiling from source the makefile normally already specifies the -O2 optimisation flag, and I doubt you’re going to get any speed benefits from changing that.
The GCC website is an excellent source of information if you want to learn more about compiling with GCC and can be found at http://gcc.gnu.org/
Why do you even want to try to apply any of this to compiling Wine? Maybe it just doesn’t handle the Windows application you want to use it to run very well? If this is the case, you could try running the program in VirtualBox; dual boot or look at the Linux alternatives of this program.