|
|
@@ -179,6 +179,43 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ |
|
|
fi
|
|
|
fi
|
|
|
|
|
|
+ if test x$use_hardening != xno; then
|
|
|
+ BITCOIN_QT_CHECK([
|
|
|
+ AC_MSG_CHECKING(whether -fPIE can be used with this Qt config)
|
|
|
+ TEMP_CPPFLAGS=$CPPFLAGS
|
|
|
+ TEMP_CXXFLAGS=$CXXFLAGS
|
|
|
+ CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
|
|
+ CXXFLAGS="$PIE_FLAGS $CXXFLAGS"
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <QtCore/qconfig.h>]],
|
|
|
+ [[
|
|
|
+ #if defined(QT_REDUCE_RELOCATIONS)
|
|
|
+ choke;
|
|
|
+ #endif
|
|
|
+ ]])],
|
|
|
+ [ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIE_FLAGS ],
|
|
|
+ [ AC_MSG_RESULT(no); QT_PIE_FLAGS=$PIC_FLAGS]
|
|
|
+ )
|
|
|
+ CPPFLAGS=$TEMP_CPPFLAGS
|
|
|
+ CXXFLAGS=$TEMP_CXXFLAGS
|
|
|
+ ])
|
|
|
+ else
|
|
|
+ BITCOIN_QT_CHECK([
|
|
|
+ AC_MSG_CHECKING(whether -fPIC is needed with this Qt config)
|
|
|
+ TEMP_CPPFLAGS=$CPPFLAGS
|
|
|
+ CPPFLAGS="$QT_INCLUDES $CPPFLAGS"
|
|
|
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <QtCore/qconfig.h>]],
|
|
|
+ [[
|
|
|
+ #if defined(QT_REDUCE_RELOCATIONS)
|
|
|
+ choke;
|
|
|
+ #endif
|
|
|
+ ]])],
|
|
|
+ [ AC_MSG_RESULT(no)],
|
|
|
+ [ AC_MSG_RESULT(yes); QT_PIE_FLAGS=$PIC_FLAGS]
|
|
|
+ )
|
|
|
+ CPPFLAGS=$TEMP_CPPFLAGS
|
|
|
+ ])
|
|
|
+ fi
|
|
|
+
|
|
|
BITCOIN_QT_PATH_PROGS([MOC], [moc-qt${bitcoin_qt_got_major_vers} moc${bitcoin_qt_got_major_vers} moc], $qt_bin_path)
|
|
|
BITCOIN_QT_PATH_PROGS([UIC], [uic-qt${bitcoin_qt_got_major_vers} uic${bitcoin_qt_got_major_vers} uic], $qt_bin_path)
|
|
|
BITCOIN_QT_PATH_PROGS([RCC], [rcc-qt${bitcoin_qt_got_major_vers} rcc${bitcoin_qt_got_major_vers} rcc], $qt_bin_path)
|
|
|
@@ -224,6 +261,7 @@ AC_DEFUN([BITCOIN_QT_CONFIGURE],[ |
|
|
])
|
|
|
AC_MSG_RESULT([$bitcoin_enable_qt (Qt${bitcoin_qt_got_major_vers})])
|
|
|
|
|
|
+ AC_SUBST(QT_PIE_FLAGS)
|
|
|
AC_SUBST(QT_INCLUDES)
|
|
|
AC_SUBST(QT_LIBS)
|
|
|
AC_SUBST(QT_LDFLAGS)
|
|
|
|
0 comments on commit
5c0b357