[PATCH RESEND] configure: Don't warn about lack of PIE on macOS

Roman Bolshakov posted 1 patch 3 years, 4 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20210102125017.41032-1-r.bolshakov@yadro.com
configure | 2 ++
1 file changed, 2 insertions(+)
[PATCH RESEND] configure: Don't warn about lack of PIE on macOS
Posted by Roman Bolshakov 3 years, 4 months ago
ld64 is making PIE executables for 10.7 and above by default, as
documented in ld(1).

Reviewed-by: Cameron Esfahani <dirty@apple.com>
Signed-off-by: Roman Bolshakov <r.bolshakov@yadro.com>
---
 configure | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/configure b/configure
index 881af4b6be..942e20dfe7 100755
--- a/configure
+++ b/configure
@@ -2157,6 +2157,8 @@ elif compile_prog "-Werror -fPIE -DPIE" "-pie"; then
   CONFIGURE_CFLAGS="-fPIE -DPIE $CONFIGURE_CFLAGS"
   CONFIGURE_LDFLAGS="-pie $CONFIGURE_LDFLAGS"
   pie="yes"
+elif test "$darwin" = "yes"; then
+  pie="yes"
 elif test "$pie" = "yes"; then
   error_exit "PIE not available due to missing toolchain support"
 else
-- 
2.29.2