configure: For Mac, link wineloader with -no_pie if it's available.
This is necessary for the specified image base and WINE_DOS and WINE_SHAREDHEAP segment addresses to be respected. The latter are necessary to reserve the correct ranges of the address space.
This commit is contained in:
parent
bd460bca1c
commit
5ddaf34d69
|
@ -7719,9 +7719,31 @@ uninstall::
|
||||||
APPKIT_LIBS="-framework AppKit"
|
APPKIT_LIBS="-framework AppKit"
|
||||||
|
|
||||||
LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist"
|
LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist"
|
||||||
case $host_os in
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-no_pie" >&5
|
||||||
darwin11*) LDEXECFLAGS="-Wl,-macosx_version_min,10.6 $LDEXECFLAGS" ;;
|
$as_echo_n "checking whether the compiler supports -Wl,-no_pie... " >&6; }
|
||||||
esac
|
if ${ac_cv_cflags__Wl__no_pie+:} false; then :
|
||||||
|
$as_echo_n "(cached) " >&6
|
||||||
|
else
|
||||||
|
ac_wine_try_cflags_saved=$CFLAGS
|
||||||
|
CFLAGS="$CFLAGS -Wl,-no_pie"
|
||||||
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
|
/* end confdefs.h. */
|
||||||
|
int main(int argc, char **argv) { return 0; }
|
||||||
|
_ACEOF
|
||||||
|
if ac_fn_c_try_link "$LINENO"; then :
|
||||||
|
ac_cv_cflags__Wl__no_pie=yes
|
||||||
|
else
|
||||||
|
ac_cv_cflags__Wl__no_pie=no
|
||||||
|
fi
|
||||||
|
rm -f core conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
CFLAGS=$ac_wine_try_cflags_saved
|
||||||
|
fi
|
||||||
|
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl__no_pie" >&5
|
||||||
|
$as_echo "$ac_cv_cflags__Wl__no_pie" >&6; }
|
||||||
|
if test "x$ac_cv_cflags__Wl__no_pie" = xyes; then :
|
||||||
|
LDEXECFLAGS="-Wl,-no_pie $LDEXECFLAGS"
|
||||||
|
fi
|
||||||
if test "$ac_cv_header_DiskArbitration_DiskArbitration_h" = "yes"
|
if test "$ac_cv_header_DiskArbitration_DiskArbitration_h" = "yes"
|
||||||
then
|
then
|
||||||
DISKARBITRATION_LIBS="-framework DiskArbitration -framework CoreFoundation"
|
DISKARBITRATION_LIBS="-framework DiskArbitration -framework CoreFoundation"
|
||||||
|
|
|
@ -760,9 +760,8 @@ uninstall::
|
||||||
AC_SUBST(CORESERVICES_LIBS,"-framework CoreServices")
|
AC_SUBST(CORESERVICES_LIBS,"-framework CoreServices")
|
||||||
AC_SUBST(APPKIT_LIBS,"-framework AppKit")
|
AC_SUBST(APPKIT_LIBS,"-framework AppKit")
|
||||||
LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist"
|
LDEXECFLAGS="-image_base 0x7bf00000 -Wl,-segaddr,WINE_DOS,0x00001000,-segaddr,WINE_SHAREDHEAP,0x7f000000,-sectcreate,__TEXT,__info_plist,wine_info.plist"
|
||||||
case $host_os in
|
WINE_TRY_CFLAGS([-Wl,-no_pie],
|
||||||
darwin11*) LDEXECFLAGS="-Wl,-macosx_version_min,10.6 $LDEXECFLAGS" ;;
|
[LDEXECFLAGS="-Wl,-no_pie $LDEXECFLAGS"])
|
||||||
esac
|
|
||||||
if test "$ac_cv_header_DiskArbitration_DiskArbitration_h" = "yes"
|
if test "$ac_cv_header_DiskArbitration_DiskArbitration_h" = "yes"
|
||||||
then
|
then
|
||||||
dnl DiskArbitration API is not public on Darwin < 8.0, use it only if header found
|
dnl DiskArbitration API is not public on Darwin < 8.0, use it only if header found
|
||||||
|
|
Loading…
Reference in New Issue