Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ AH_TOP([#ifndef LIBWALLYCORE_CONFIG_H
AH_BOTTOM([#include "ccan_config.h"
#endif /*LIBWALLYCORE_CONFIG_H*/])

# Remove any optimisation/debug flags from CFLAGS, these are controlled
# only by --enable-debug, in order to only use tested configurations
CFLAGS=`echo $CFLAGS | sed 's/-[Og][0-9]*[ $$]*//'`

LDPATH_VAR=LD_LIBRARY_PATH
case $host_os in
*darwin*)
Expand Down Expand Up @@ -144,14 +140,14 @@ if test "x$debug" == "xyes"; then
fi
else
# Optimise and harden if we can
AX_CHECK_COMPILE_FLAG([-O3], [AM_CFLAGS="$AM_CFLAGS -O3"])
AX_CHECK_COMPILE_FLAG([-O2], [AM_CFLAGS="-O2 $AM_CFLAGS"])
AC_CHECK_DEFINE([_FORTIFY_SOURCE], [], [
AX_CHECK_COMPILE_FLAG([-D_FORTIFY_SOURCE=2],
[CPPFLAGS="$CPPFLAGS -D_FORTIFY_SOURCE=2"])
])
AX_CHECK_COMPILE_FLAG([-fstack-protector-strong], [AM_CFLAGS="$AM_CFLAGS -fstack-protector-strong"])
AX_CHECK_COMPILE_FLAG([-DNDEBUG=1], [AM_CFLAGS="$AM_CFLAGS -DNDEBUG=1"])
AX_CHECK_LINK_FLAG([-O3], [LDFLAGS="$LDFLAGS -O3"])
AX_CHECK_LINK_FLAG([-O2], [LDFLAGS="-O2 $LDFLAGS"])
AX_CHECK_LINK_FLAG([-Wl,-z,relro], [LDFLAGS="$LDFLAGS -Wl,-z,relro"])
fi

Expand Down
2 changes: 1 addition & 1 deletion src/secp256k1/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ if test x"$enable_coverage" = x"yes"; then
CFLAGS="$CFLAGS -O0 --coverage"
LDFLAGS="$LDFLAGS --coverage"
else
CFLAGS="$CFLAGS -O3"
CFLAGS="-O2 $CFLAGS"
fi

AC_MSG_CHECKING([for __builtin_popcount])
Expand Down