Re: FVWM: Compiling FVWM with optimizations

From: Tom Alsberg <alsbergt_at_zoopee.org>
Date: Wed, 27 Mar 2002 14:01:20 +0200

Hi there...
Please read my comments bellow.

On Wed, Mar 27, 2002 at 01:52:17AM -0500, Walter Dnes wrote:
> I'm currently working on getting CRUX linux ( http://crux.nu ) running
> on my second machine. It's a lightweight, but up-to-date, highly
> optimized linux. Everything is supposed to be optimized as "march=i686".
> I've done the standard "./configure && make && make install" routine,
> but tweaking compiler options is new to me. My first guess is something
> like...
>
> set CFLAGS="-O2 -march=i686"
> export CFLAGS
>
> Is this correct, and if not, what should I be doing ?

Well, according to 'export' it seems you're using a Bourne shell... so
you should not use 'set'... Just:

CFLAGS="-O2 -march=i686"
export CFLAGS

Do that before running ./configure, and those CFLAGS will be used for
all of the compilation. configure generates the Makefiles with the
given CFLAGS.

Also, you can always make with different CFLAGS than you configured
with, by adding the parameter at the end of the make command line,
e.g.:
make CFLAGS='-O2 -march=i686'

Also, not important with FVWM, as it has no C++ code, I think, but you
should also set CXXFLAGS to the same thing you set CFLAGS for C++ code
to be optimized in the same way.

Remember that code compiled with '-march=i686' will most probably not
run on any lower machine, e.g. i586, i486, or i386... As it will
generate instructions specific to i686. A more moderate thing could be
'-mcpu=i686', which will optimize the order of instructions for the
i686, but not generate any i686-specific instructions.
The two can also be used together, for example:

CFLAGS='-O2 -march=i586 -mcpu=i686'

will generate only i586 specific instructions, but optimize the code
for the i686.

  Best regards,
  -- Tom

>
> --
> Walter Dnes <waltdnes_at_waltdnes.org>
> I'm not repeating myself; I'm an X Window user, I'm an ex-Windows user

-- 
  Tom Alsberg - certified insane, complete illiterate.
        e-mail: <alsbergt_at_softhome.net>
	Homepage: http://www.cs.huji.ac.il/~alsbergt/
  * An idea is not responsible for the people who believe in it.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Wed Mar 27 2002 - 06:02:49 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:52 BST