@@ -206,9 +206,9 @@ AC_ARG_WITH([qrencode],
206
206
207
207
AC_ARG_ENABLE ( [ hardening] ,
208
208
[ 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)] ) ] ,
210
210
[ use_hardening=$enableval] ,
211
- [ use_hardening=auto ] )
211
+ [ use_hardening=yes ] )
212
212
213
213
AC_ARG_ENABLE ( [ reduce-exports] ,
214
214
[ AS_HELP_STRING ( [ --enable-reduce-exports] ,
@@ -281,13 +281,6 @@ AC_ARG_WITH([sanitizers],
281
281
[ comma separated list of extra sanitizers to build with (default is none enabled)] ) ] ,
282
282
[ use_sanitizers=$withval] )
283
283
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
-
291
284
dnl Turn warnings into errors
292
285
AC_ARG_ENABLE ( [ werror] ,
293
286
[ AS_HELP_STRING ( [ --enable-werror] ,
@@ -844,30 +837,12 @@ if test "$ac_cv_sys_large_files" != "" &&
844
837
CORE_CPPFLAGS="$CORE_CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
845
838
fi
846
839
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
-
864
840
if test "$TARGET_OS" != "windows"; then
865
841
dnl All windows code is PIC, forcing it on just adds useless compile warnings
866
842
AX_CHECK_COMPILE_FLAG ( [ -fPIC] , [ PIC_FLAGS="-fPIC"] )
867
843
fi
868
844
869
845
if test "$use_hardening" != "no"; then
870
- use_hardening=yes
871
846
AX_CHECK_COMPILE_FLAG ( [ -Wstack-protector] , [ HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -Wstack-protector"] )
872
847
AX_CHECK_COMPILE_FLAG ( [ -fstack-protector-all] , [ HARDENED_CXXFLAGS="$HARDENED_CXXFLAGS -fstack-protector-all"] )
873
848
@@ -1684,8 +1659,6 @@ AC_SUBST(WARN_CXXFLAGS)
1684
1659
AC_SUBST ( NOWARN_CXXFLAGS )
1685
1660
AC_SUBST ( DEBUG_CXXFLAGS )
1686
1661
AC_SUBST ( ERROR_CXXFLAGS )
1687
- AC_SUBST ( GPROF_CXXFLAGS )
1688
- AC_SUBST ( GPROF_LDFLAGS )
1689
1662
AC_SUBST ( HARDENED_CXXFLAGS )
1690
1663
AC_SUBST ( HARDENED_CPPFLAGS )
1691
1664
AC_SUBST ( HARDENED_LDFLAGS )
@@ -1793,7 +1766,6 @@ echo " with natpmp = $use_natpmp"
1793
1766
echo " USDT tracing = $use_usdt"
1794
1767
echo " sanitizers = $use_sanitizers"
1795
1768
echo " debug enabled = $enable_debug"
1796
- echo " gprof enabled = $enable_gprof"
1797
1769
echo " werror = $enable_werror"
1798
1770
echo
1799
1771
echo " target os = $host_os"
@@ -1803,8 +1775,8 @@ echo " CC = $CC"
1803
1775
echo " CFLAGS = $PTHREAD_CFLAGS $SANITIZER_CFLAGS $CFLAGS"
1804
1776
echo " CPPFLAGS = $DEBUG_CPPFLAGS $HARDENED_CPPFLAGS $CORE_CPPFLAGS $CPPFLAGS"
1805
1777
echo " 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"
1808
1780
echo " AR = $AR"
1809
1781
echo " ARFLAGS = $ARFLAGS"
1810
1782
echo
0 commit comments