Changed conftests for disabling position-independent code

Basilisk II (Intel Mac): uses -Wl,-no_pie flag
Basilisk II (other): uses -no-pie flag if available
SheepShaver: Does not use either flag
This commit is contained in:
robxnano 2022-10-10 14:50:04 +01:00
parent f61701df3c
commit cb67534d28
2 changed files with 5 additions and 27 deletions

View File

@ -1124,19 +1124,15 @@ AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, "$have_mmap_vm",
fi dnl HAVE_MMAP_VM
dnl Check if we can disable position-independent code
AC_CACHE_CHECK([for flag to disable position-independent code],
AC_CACHE_CHECK([whether the compiler supports -no-pie],
ac_cv_no_pie, [
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,-no-pie"
LDFLAGS="$LDFLAGS -no-pie"
AC_LINK_IFELSE([AC_LANG_PROGRAM()],[
ac_cv_no_pie="-no-pie"],[
LDFLAGS="$saved_LDFLAGS -Wl,-no_pie"
AC_LINK_IFELSE([AC_LANG_PROGRAM()],[
ac_cv_no_pie="-no_pie"],[
ac_cv_no_pie="none"
])
ac_cv_no_pie="yes"],[
ac_cv_no_pie="no"
])
if [[ "$ac_cv_no_pie" = "none" ]]; then
if [[ "$ac_cv_no_pie" = "no" ]]; then
LDFLAGS="$saved_LDFLAGS"
fi
])

View File

@ -987,24 +987,6 @@ AC_TRANSLATE_DEFINE(HAVE_MMAP_VM, $have_mmap_vm,
fi dnl HAVE_MMAP_VM
dnl Check if we can disable position-independent code
AC_CACHE_CHECK([for flag to disable position-independent code],
ac_cv_no_pie, [
saved_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -Wl,-no-pie"
AC_LINK_IFELSE([AC_LANG_PROGRAM()],[
ac_cv_no_pie="-no-pie"],[
LDFLAGS="$saved_LDFLAGS -Wl,-no_pie"
AC_LINK_IFELSE([AC_LANG_PROGRAM()],[
ac_cv_no_pie="-no_pie"],[
ac_cv_no_pie="none"
])
])
if [[ "$ac_cv_no_pie" = "none" ]]; then
LDFLAGS="$saved_LDFLAGS"
fi
])
dnl Check if we can modify the __PAGEZERO segment for use as Low Memory
AC_CACHE_CHECK([whether __PAGEZERO can be Low Memory area 0x0000-0x3000],
ac_cv_pagezero_hack, [