@@ -206,9 +206,9 @@ AC_ARG_WITH([qrencode],
206206
207207AC_ARG_ENABLE ( [ hardening] ,
208208 [ AS_HELP_STRING ( [ --disable-hardening] ,
209- [ do not attempt to harden the resulting executables (default is to harden when possible )] ) ] ,
209+ [ do not attempt to harden the resulting executables (default is to harden)] ) ] ,
210210 [ use_hardening=$enableval] ,
211- [ use_hardening=auto ] )
211+ [ use_hardening=yes ] )
212212
213213AC_ARG_ENABLE ( [ reduce-exports] ,
214214 [ AS_HELP_STRING ( [ --enable-reduce-exports] ,
@@ -281,13 +281,6 @@ AC_ARG_WITH([sanitizers],
281281 [ comma separated list of extra sanitizers to build with (default is none enabled)] ) ] ,
282282 [ use_sanitizers=$withval] )
283283
284- dnl Enable gprof profiling
285- AC_ARG_ENABLE ( [ gprof] ,
286- [ AS_HELP_STRING ( [ --enable-gprof] ,
287- [ use gprof profiling compiler flags (default is no)] ) ] ,
288- [ enable_gprof=$enableval] ,
289- [ enable_gprof=no] )
290-
291284dnl Turn warnings into errors
292285AC_ARG_ENABLE ( [ werror] ,
293286 [ AS_HELP_STRING ( [ --enable-werror] ,
@@ -844,30 +837,12 @@ if test "$ac_cv_sys_large_files" != "" &&
844837 CORE_CPPFLAGS="$CORE_CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
845838fi
846839
847- if test "$enable_gprof" = "yes"; then
848- dnl -pg is incompatible with -pie. Since hardening and profiling together doesn't make sense,
849- dnl we simply make them mutually exclusive here. Additionally, hardened toolchains may force
850- dnl -pie by default, in which case it needs to be turned off with -no-pie.
851-
852- if test "$use_hardening" = "yes"; then
853- AC_MSG_ERROR ( [ gprof profiling is not compatible with hardening. Reconfigure with --disable-hardening or --disable-gprof] )
854- fi
855- use_hardening=no
856- AX_CHECK_COMPILE_FLAG ( [ -pg] ,[ GPROF_CXXFLAGS="-pg"] ,
857- [ AC_MSG_ERROR ( [ gprof profiling requested but not available] ) ] , [ $CXXFLAG_WERROR] )
858-
859- AX_CHECK_LINK_FLAG ( [ -no-pie] , [ GPROF_LDFLAGS="-no-pie"] )
860- AX_CHECK_LINK_FLAG ( [ -pg] , [ GPROF_LDFLAGS="$GPROF_LDFLAGS -pg"] ,
861- [ AC_MSG_ERROR ( [ gprof profiling requested but not available] ) ] , [ $GPROF_LDFLAGS] )
862- fi
863-
864840if test "$TARGET_OS" != "windows"; then
865841 dnl All windows code is PIC, forcing it on just adds useless compile warnings
866842 AX_CHECK_COMPILE_FLAG ( [ -fPIC] , [ PIC_FLAGS="-fPIC"] )
867843fi
868844
869845if test "$use_hardening" != "no"; then
870- use_hardening=yes
871846 AX_CHECK_COMPILE_FLAG ( [ -Wstack-protector] , [ HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"] )
872847 AX_CHECK_COMPILE_FLAG ( [ -fstack-protector-all] , [ HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"] )
873848
@@ -1684,8 +1659,6 @@ AC_SUBST(WARN_CXXFLAGS)
16841659AC_SUBST ( NOWARN_CXXFLAGS )
16851660AC_SUBST ( DEBUG_CXXFLAGS )
16861661AC_SUBST ( ERROR_CXXFLAGS )
1687- AC_SUBST ( GPROF_CXXFLAGS )
1688- AC_SUBST ( GPROF_LDFLAGS )
16891662AC_SUBST ( HARDENED_CXXFLAGS )
16901663AC_SUBST ( HARDENED_CPPFLAGS )
16911664AC_SUBST ( HARDENED_LDFLAGS )
@@ -1793,7 +1766,6 @@ echo " with natpmp = $use_natpmp"
17931766echo " USDT tracing = $use_usdt"
17941767echo " sanitizers = $use_sanitizers"
17951768echo " debug enabled = $enable_debug"
1796- echo " gprof enabled = $enable_gprof"
17971769echo " werror = $enable_werror"
17981770echo
17991771echo " target os = $host_os"
@@ -1803,8 +1775,8 @@ echo " CC = $CC"
18031775echo " CFLAGS = $PTHREAD_CFLAGS $SANITIZER_CFLAGS $CFLAGS"
18041776echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CORE_CPPFLAGS $CPPFLAGS"
18051777echo " CXX = $CXX"
1806- echo " CXXFLAGS = $CORE_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $GPROF_CXXFLAGS $ SANITIZER_CXXFLAGS $CXXFLAGS"
1807- echo " LDFLAGS = $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $ SANITIZER_LDFLAGS $CORE_LDFLAGS $LDFLAGS"
1778+ echo " CXXFLAGS = $CORE_CXXFLAGS $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOWARN_CXXFLAGS $ERROR_CXXFLAGS $SANITIZER_CXXFLAGS $CXXFLAGS"
1779+ echo " LDFLAGS = $PTHREAD_LIBS $HARDENED_LDFLAGS $SANITIZER_LDFLAGS $CORE_LDFLAGS $LDFLAGS"
18081780echo " AR = $AR"
18091781echo " ARFLAGS = $ARFLAGS"
18101782echo
0 commit comments