Skip to content

Commit ca739cb

Browse files
committed
Compile with optimization flag -O2 by default instead of -O3
1 parent 83fb1bc commit ca739cb

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

configure.ac

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ AH_TOP([#define LIBSECP256K1_CONFIG_H])
88
AH_BOTTOM([#endif /*LIBSECP256K1_CONFIG_H*/])
99
AM_INIT_AUTOMAKE([foreign subdir-objects])
1010

11-
# Set -g (but not -O2 because this would override -O3 which we're adding later)
12-
# if CFLAGS are not already set (see PROG_CC in the Autoconf manual)
11+
# Set -g if CFLAGS are not already set, which matches the default autoconf
12+
# behavior (see PROG_CC in the Autoconf manual) with the exception that we don't
13+
# set -O2 here because we set it in any case (see further down).
1314
: ${CFLAGS="-g"}
1415
LT_INIT
1516

@@ -180,7 +181,7 @@ if test x"$enable_coverage" = x"yes"; then
180181
CFLAGS="-O0 --coverage $CFLAGS"
181182
LDFLAGS="--coverage $LDFLAGS"
182183
else
183-
CFLAGS="-O3 $CFLAGS"
184+
CFLAGS="-O2 $CFLAGS"
184185
fi
185186

186187
if test x"$use_ecmult_static_precomputation" != x"no"; then

0 commit comments

Comments
 (0)