Subject: Re: bug#65988: 30.0.50; Emacs and -O3 compiler optimization
From: Eli Zaretskii <[email-masked]>
To: Arash Esbati <[email-masked]>
Cc: [email-masked]
Date: Fri, 15 Sep 2023 14:29:38 +0300
List-Id: <debbugs-submit.debbugs.gnu.org>

> From: Arash Esbati <[email-masked]>
> Date: Fri, 15 Sep 2023 11:22:36 +0200
> 
> Presuming that the note above applies to GCC on all platforms, I suggest
> to change/adjust the following example in INSTALL[2]:
> 
>   Here's an example of a 'configure' invocation, assuming a Bourne-like
>   shell such as Bash, which uses these variables:
> 
>     ./configure \
>       CPPFLAGS='-I/foo/myinclude' LDFLAGS='-L/bar/mylib' \
>       CFLAGS='-O3' LIBS='-lfoo -lbar'
> 
>   (this is all one shell command).  This tells 'configure' to instruct the
>   preprocessor to look in the '/foo/myinclude' directory for header
>   files (in addition to the standard directories), instruct the linker
>   to look in '/bar/mylib' for libraries, pass the -O3 optimization
>   switch to the compiler, and link against libfoo and libbar
>   libraries in addition to the standard ones.
> 
> IIRC this was the place where I picked up the -O3 switch for the script
> I wrote for building Emacs.

You really shouldn't treat what's in INSTALL so literally: it's just
an example to illustrate how to use these switches.

I changed it not to use -O3.