SHA256
1
0
forked from pool/wine
wine/0004-Revert-loader-Make-the-loader-position-independent-o.patch

90 lines
3.1 KiB
Diff
Raw Normal View History

From 26027b7b84b6fa2fa3b04092c8e6201dc0cad772 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fvogt@suse.de>
Date: Thu, 29 Jun 2023 09:59:47 +0200
Subject: [PATCH 4/4] Revert "loader: Make the loader position-independent on
64-bit."
This reverts commit cc2cfb9b792bee681b96c5859084fd6d4d0bbed7.
---
configure | 32 +-------------------------------
configure.ac | 6 +-----
2 files changed, 2 insertions(+), 36 deletions(-)
diff --git a/configure b/configure
index a38400ad529..1de33458d28 100755
--- a/configure
+++ b/configure
@@ -10248,7 +10248,7 @@ fi
WINEPRELOADER_LDFLAGS="-static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7d400000"
case $host_cpu in
- *i[3456789]86* | arm*)
+ *i[3456789]86* | x86_64 | *aarch64* | arm*)
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-Ttext-segment=0x7bc00000" >&5
printf %s "checking whether the compiler supports -Wl,-Ttext-segment=0x7bc00000... " >&6; }
if test ${ac_cv_cflags__Wl__Ttext_segment_0x7bc00000+y}
@@ -10339,36 +10339,6 @@ printf "%s\n" "$ac_cv_cflags__Wl__z_max_page_size_0x1000" >&6; }
if test "x$ac_cv_cflags__Wl__z_max_page_size_0x1000" = xyes
then :
WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-z,max-page-size=0x1000"
-fi
- ;;
- *)
- { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports -Wl,-pie" >&5
-printf %s "checking whether the compiler supports -Wl,-pie... " >&6; }
-if test ${ac_cv_cflags__Wl__pie+y}
-then :
- printf %s "(cached) " >&6
-else $as_nop
- ac_wine_try_cflags_saved=$CFLAGS
-CFLAGS="$CFLAGS -Wl,-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__pie=yes
-else $as_nop
- ac_cv_cflags__Wl__pie=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.beam \
- conftest$ac_exeext conftest.$ac_ext
-CFLAGS=$ac_wine_try_cflags_saved
-fi
-{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cflags__Wl__pie" >&5
-printf "%s\n" "$ac_cv_cflags__Wl__pie" >&6; }
-if test "x$ac_cv_cflags__Wl__pie" = xyes
-then :
- WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-pie"
fi
;;
esac
diff --git a/configure.ac b/configure.ac
index b9b3ee4ffc3..23f4250220d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -772,7 +772,7 @@ case $host_os in
WINEPRELOADER_LDFLAGS="-static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7d400000"
case $host_cpu in
- *i[[3456789]]86* | arm*)
+ *i[[3456789]]86* | x86_64 | *aarch64* | arm*)
WINE_TRY_CFLAGS([-Wl,-Ttext-segment=0x7bc00000],
[case $host_os in
freebsd* | kfreebsd*-gnu) WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-Ttext-segment=0x60000000" ;;
@@ -786,10 +786,6 @@ case $host_os in
WINE_TRY_CFLAGS([-Wl,-z,max-page-size=0x1000],
[WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-z,max-page-size=0x1000"])
;;
- *)
- WINE_TRY_CFLAGS([-Wl,-pie],
- [WINELOADER_LDFLAGS="$WINELOADER_LDFLAGS -Wl,-pie"])
- ;;
esac
;;
esac
--
2.41.0