mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-19 01:42:58 +01:00
build: stop overriding user CXXFLAGS
Let users have the final say in regards to CXXFLAGS.
This commit is contained in:
parent
3e2ef23c3e
commit
7b00595d33
@ -117,7 +117,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
||||
TEMP_CPPFLAGS=$CPPFLAGS
|
||||
TEMP_CXXFLAGS=$CXXFLAGS
|
||||
CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
|
||||
CXXFLAGS="$PIC_FLAGS $CXXFLAGS"
|
||||
CXXFLAGS="$PIC_FLAGS $CORE_CXXFLAGS $CXXFLAGS"
|
||||
_BITCOIN_QT_IS_STATIC
|
||||
if test "$bitcoin_cv_static_qt" = "yes"; then
|
||||
_BITCOIN_QT_CHECK_STATIC_LIBS
|
||||
@ -179,7 +179,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[
|
||||
TEMP_CPPFLAGS=$CPPFLAGS
|
||||
TEMP_CXXFLAGS=$CXXFLAGS
|
||||
CPPFLAGS="$QT_INCLUDES $CORE_CPPFLAGS $CPPFLAGS"
|
||||
CXXFLAGS="$PIE_FLAGS $CXXFLAGS"
|
||||
CXXFLAGS="$PIE_FLAGS $CORE_CXXFLAGS $CXXFLAGS"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <QtCore/qconfig.h>
|
||||
#ifndef QT_VERSION
|
||||
|
17
configure.ac
17
configure.ac
@ -470,7 +470,7 @@ if test "$CXXFLAGS_overridden" = "no"; then
|
||||
fi
|
||||
|
||||
dnl Don't allow extended (non-ASCII) symbols in identifiers. This is easier for code review.
|
||||
AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers], [CXXFLAGS="$CXXFLAGS -fno-extended-identifiers"], [], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_COMPILE_FLAG([-fno-extended-identifiers], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fno-extended-identifiers"], [], [$CXXFLAG_WERROR])
|
||||
|
||||
enable_sse42=no
|
||||
enable_sse41=no
|
||||
@ -855,9 +855,15 @@ if test "$use_lcov" = "yes"; then
|
||||
|
||||
AX_CHECK_LINK_FLAG([--coverage], [CORE_LDFLAGS="$CORE_LDFLAGS --coverage"],
|
||||
[AC_MSG_ERROR([lcov testing requested but --coverage linker flag does not work])])
|
||||
AX_CHECK_COMPILE_FLAG([--coverage],[CXXFLAGS="$CXXFLAGS --coverage"],
|
||||
AX_CHECK_COMPILE_FLAG([--coverage],[CORE_CXXFLAGS="$CORE_CXXFLAGS --coverage"],
|
||||
[AC_MSG_ERROR([lcov testing requested but --coverage flag does not work])])
|
||||
CXXFLAGS="$CXXFLAGS -Og"
|
||||
dnl If coverage is enabled, and the user hasn't overriden CXXFLAGS, clear
|
||||
dnl them, to prevent autoconfs "-g -O2" being added. Otherwise we'd end up
|
||||
dnl with "--coverage -Og -O0 -g -O2".
|
||||
if test "$CXXFLAGS_overridden" = "no"; then
|
||||
CXXFLAGS=""
|
||||
fi
|
||||
CORE_CXXFLAGS="$CORE_CXXFLAGS -Og -O0"
|
||||
fi
|
||||
|
||||
if test "$use_lcov_branch" != "no"; then
|
||||
@ -1512,7 +1518,7 @@ AM_CONDITIONAL([ENABLE_SYSCALL_SANDBOX], [test "$use_syscall_sandbox" != "no"])
|
||||
|
||||
dnl Check for reduced exports
|
||||
if test "$use_reduce_exports" = "yes"; then
|
||||
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CXXFLAGS="$CXXFLAGS -fvisibility=hidden"],
|
||||
AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], [CORE_CXXFLAGS="$CORE_CXXFLAGS -fvisibility=hidden"],
|
||||
[AC_MSG_ERROR([Cannot set hidden symbol visibility. Use --disable-reduce-exports.])], [$CXXFLAG_WERROR])
|
||||
AX_CHECK_LINK_FLAG([-Wl,--exclude-libs,ALL], [RELDFLAGS="-Wl,--exclude-libs,ALL"], [], [$LDFLAG_WERROR])
|
||||
fi
|
||||
@ -1875,6 +1881,7 @@ AC_SUBST(BITCOIN_MP_GUI_NAME)
|
||||
AC_SUBST(RELDFLAGS)
|
||||
AC_SUBST(CORE_LDFLAGS)
|
||||
AC_SUBST(CORE_CPPFLAGS)
|
||||
AC_SUBST(CORE_CXXFLAGS)
|
||||
AC_SUBST(DEBUG_CPPFLAGS)
|
||||
AC_SUBST(WARN_CXXFLAGS)
|
||||
AC_SUBST(NOWARN_CXXFLAGS)
|
||||
@ -2008,7 +2015,7 @@ echo " CC = $CC"
|
||||
echo " CFLAGS = $PTHREAD_CFLAGS $CFLAGS"
|
||||
echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CORE_CPPFLAGS $CPPFLAGS"
|
||||
echo " CXX = $CXX"
|
||||
echo " CXXFLAGS = $LTO_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CXXFLAGS"
|
||||
echo " CXXFLAGS = $LTO_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $CORE_CXXFLAGS $CXXFLAGS"
|
||||
echo " LDFLAGS = $LTO_LDFLAGS $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $CORE_LDFLAGS $LDFLAGS"
|
||||
echo " ARFLAGS = $ARFLAGS"
|
||||
echo
|
||||
|
@ -9,7 +9,7 @@ print-%: FORCE
|
||||
DIST_SUBDIRS = secp256k1
|
||||
|
||||
AM_LDFLAGS = $(LIBTOOL_LDFLAGS) $(HARDENED_LDFLAGS) $(GPROF_LDFLAGS) $(SANITIZER_LDFLAGS) $(LTO_LDFLAGS) $(CORE_LDFLAGS)
|
||||
AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS) $(LTO_CXXFLAGS)
|
||||
AM_CXXFLAGS = $(DEBUG_CXXFLAGS) $(HARDENED_CXXFLAGS) $(WARN_CXXFLAGS) $(NOWARN_CXXFLAGS) $(ERROR_CXXFLAGS) $(GPROF_CXXFLAGS) $(SANITIZER_CXXFLAGS) $(LTO_CXXFLAGS) $(CORE_CXXFLAGS)
|
||||
AM_CPPFLAGS = $(DEBUG_CPPFLAGS) $(HARDENED_CPPFLAGS) $(CORE_CPPFLAGS)
|
||||
AM_LIBTOOLFLAGS = --preserve-dup-deps
|
||||
PTHREAD_FLAGS = $(PTHREAD_CFLAGS) $(PTHREAD_LIBS)
|
||||
|
Loading…
Reference in New Issue
Block a user