@@ -115,9 +115,9 @@ AC_ARG_ENABLE([hardening],
115115
116116AC_ARG_ENABLE ( [ reduce-exports] ,
117117 [ AS_HELP_STRING ( [ --enable-reduce-exports] ,
118- [ attempt to reduce exported symbols in the resulting executables (default is yes )] ) ] ,
118+ [ attempt to reduce exported symbols in the resulting executables (default is no )] ) ] ,
119119 [ use_reduce_exports=$enableval] ,
120- [ use_reduce_exports=auto ] )
120+ [ use_reduce_exports=no ] )
121121
122122AC_ARG_ENABLE ( [ ccache] ,
123123 [ AS_HELP_STRING ( [ --enable-ccache] ,
@@ -133,7 +133,7 @@ AC_ARG_ENABLE([lcov],
133133
134134AC_ARG_ENABLE ( [ glibc-back-compat] ,
135135 [ AS_HELP_STRING ( [ --enable-glibc-back-compat] ,
136- [ enable backwards compatibility with glibc and libstdc++ ] ) ] ,
136+ [ enable backwards compatibility with glibc] ) ] ,
137137 [ use_glibc_compat=$enableval] ,
138138 [ use_glibc_compat=no] )
139139
@@ -471,22 +471,14 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
471471 [
472472 AC_MSG_RESULT ( no )
473473 if test x$use_reduce_exports = xyes; then
474- AC_MSG_ERROR ( [ Cannot find a working visibility attribute. Use --disable-reduced -exports.] )
474+ AC_MSG_ERROR ( [ Cannot find a working visibility attribute. Use --disable-reduce -exports.] )
475475 fi
476- AC_MSG_WARN ( [ Cannot find a working visibility attribute. Disabling reduced exports.] )
477- use_reduce_exports=no
478476 ]
479477)
480478
481- if test x$use_reduce_exports != xno ; then
479+ if test x$use_reduce_exports = xyes ; then
482480 AX_CHECK_COMPILE_FLAG ( [ -fvisibility=hidden] ,[ RE_CXXFLAGS="-fvisibility=hidden"] ,
483- [
484- if test x$use_reduce_exports = xyes; then
485- AC_MSG_ERROR ( [ Cannot set default symbol visibility. Use --disable-reduced-exports.] )
486- fi
487- AC_MSG_WARN ( [ Cannot set default symbol visibility. Disabling reduced exports.] )
488- use_reduce_exports=no
489- ] )
481+ [ AC_MSG_ERROR ( [ Cannot set default symbol visibility. Use --disable-reduce-exports.] ) ] )
490482fi
491483
492484LEVELDB_CPPFLAGS=
@@ -533,7 +525,7 @@ AX_BOOST_THREAD
533525AX_BOOST_CHRONO
534526
535527
536- if test x$use_reduce_exports != xno ; then
528+ if test x$use_reduce_exports = xyes ; then
537529 AC_MSG_CHECKING ( [ for working boost reduced exports] )
538530 TEMP_CPPFLAGS="$CPPFLAGS"
539531 CPPFLAGS="$BOOST_CPPFLAGS $CPPFLAGS"
@@ -547,25 +539,14 @@ if test x$use_reduce_exports != xno; then
547539 #endif
548540 ] ] ) ] ,[
549541 AC_MSG_RESULT ( yes )
550- ] ,[ :
551- if test x$use_reduce_exports = xauto; then
552- use_reduce_exports=no
553- else
554- if test x$use_reduce_exports = xyes; then
555- AC_MSG_ERROR ( [ boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduced-exports.] )
556- fi
557- fi
558- AC_MSG_RESULT ( no )
559- AC_MSG_WARN ( [ boost versions < 1.49 are known to have symbol visibility issues. Disabling reduced exports.] )
542+ ] ,[
543+ AC_MSG_ERROR ( [ boost versions < 1.49 are known to be broken with reduced exports. Use --disable-reduce-exports.] )
560544 ] )
561545 CPPFLAGS="$TEMP_CPPFLAGS"
562546fi
563-
564- elif test x$use_reduce_exports = xauto; then
565- use_reduce_exports=yes
566547fi
567548
568- if test x$use_reduce_exports != xno ; then
549+ if test x$use_reduce_exports = xyes ; then
569550 CXXFLAGS="$CXXFLAGS $RE_CXXFLAGS"
570551 AX_CHECK_LINK_FLAG ( [ [ -Wl,--exclude-libs,ALL] ] , [ RELDFLAGS="-Wl,--exclude-libs,ALL"] )
571552fi
827808fi
828809
829810AC_MSG_CHECKING ( [ whether to reduce exports] )
830- if test x$use_reduce_exports != xno ; then
811+ if test x$use_reduce_exports = xyes ; then
831812 AC_MSG_RESULT ( [ yes] )
832813else
833814 AC_MSG_RESULT ( [ no] )
0 commit comments