From 374cef32ac36d956f75ccc6416872498bbe66e82 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 20 Jan 2021 12:26:31 +0000 Subject: configure: Check for static PIE support Add SUPPORT_STATIC_PIE that targets can define if they support static PIE. This requires PI_STATIC_AND_HIDDEN support and various linker features as described in commit 9d7a3741c9e59eba87fb3ca6b9f979befce07826 Add --enable-static-pie configure option to build static PIE [BZ #19574] Currently defined on x86_64, i386 and aarch64 where static PIE is known to work. Reviewed-by: Adhemerval Zanella --- configure.ac | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 341d4ee..dfebb8a 100644 --- a/configure.ac +++ b/configure.ac @@ -1831,6 +1831,10 @@ libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory` AC_SUBST(libc_cv_multidir) if test "$static_pie" = yes; then + # Check target support for static PIE + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#ifndef SUPPORT_STATIC_PIE +# error static PIE is not supported +#endif]])], , AC_MSG_ERROR([the architecture does not support static PIE])) # The linker must support --no-dynamic-linker. if test "$libc_cv_no_dynamic_linker" != yes; then AC_MSG_ERROR([linker support for --no-dynamic-linker needed]) -- cgit v1.1