diff options
Diffstat (limited to 'libgcc/configure.ac')
| -rw-r--r-- | libgcc/configure.ac | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libgcc/configure.ac b/libgcc/configure.ac index 65cd3c6..5945243 100644 --- a/libgcc/configure.ac +++ b/libgcc/configure.ac @@ -258,6 +258,20 @@ AC_CACHE_CHECK([whether fixed-point is supported], [libgcc_cv_fixed_point], fixed_point=$libgcc_cv_fixed_point AC_SUBST(fixed_point) +# Check whether the compiler defines __PIE__ by default, so -fno-PIE is needed. +AC_CACHE_CHECK([whether the compiler defines __PIE__], [libgcc_cv_no_pie_cflags], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[ +#ifdef __PIE__ +#error __PIE__ defined +#endif + ]], [[]])], + [libgcc_cv_no_pie_cflags=''], + [libgcc_cv_no_pie_cflags='-fno-PIE'])]) + +NO_PIE_CFLAGS=$libgcc_cv_no_pie_cflags +AC_SUBST([NO_PIE_CFLAGS]) + # For platforms with the unwind ABI which includes an unwind library, # libunwind, we can choose to use the system libunwind. # config.gcc also contains tests of with_system_libunwind. @@ -305,9 +319,7 @@ AC_SUBST([use_tm_clone_registry]) AC_LIB_PROG_LD_GNU -AC_MSG_CHECKING([for thread model used by GCC]) -target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'` -AC_MSG_RESULT([$target_thread_file]) +GCC_AC_THREAD_MODEL # Check for assembler CFI support. AC_CACHE_CHECK([whether assembler supports CFI directives], [libgcc_cv_cfi], |
