Home GnuPG

build: Don't use -O0 which is not portable.

Description

build: Don't use -O0 which is not portable.

* src/Makefile.am (mkheader): Remove -O0 option.
  • Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>

Details

Provenance
gniibeAuthored on Jan 7 2020, 8:22 AM
Parents
rE308574372055: New error codes for SQLite
Branches
Unknown
Tags
Unknown

Event Timeline

Well, that was probably from the time I wrote that tool.

Do you really think that -O0 is non-portable in praxis? In libgcrypt we use for certain modules (twofish.c iirc)

The particular part of mkheader compilation with -O0 was introduced by dkg for cross build support.
I believe that -O<number> (where <number> is not zero) is common but -O<something-other> is dependent.
Requesting non-optimization by -O0 seems GCC specific.
(I grep-ped autoconf-archive and observed the use cases of -O0.)

If we really want to support -O0 here, it would be best to add checking by:

test "$GCC" = "yes"

in configure and only add -O0 when it's gcc.

I checked libgcrypt. -O0 is used in random/Makefile.am for o_flag_munging to disable optimization for rndjent.c. For Solaris, we can skip that by --disable-O-flag-munging.

No need to support it. What I had in mind was the compilation of tiger.c where we replace optimization flags by -O1 which, as you remarked, seems to b widely portable.