diff options
Diffstat (limited to 'Ports/python3/patches/0002-Tweak-configure-and-configure.ac.patch')
-rw-r--r-- | Ports/python3/patches/0002-Tweak-configure-and-configure.ac.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/Ports/python3/patches/0002-Tweak-configure-and-configure.ac.patch b/Ports/python3/patches/0002-Tweak-configure-and-configure.ac.patch new file mode 100644 index 0000000000..5663babf64 --- /dev/null +++ b/Ports/python3/patches/0002-Tweak-configure-and-configure.ac.patch @@ -0,0 +1,98 @@ +From ede554ba7adc8533d1089bf9d153009c0566ebac Mon Sep 17 00:00:00 2001 +From: Linus Groh <mail@linusgroh.de> +Date: Fri, 14 Jan 2022 23:35:57 +0330 +Subject: [PATCH 2/4] Tweak configure and configure.ac + +As usual, make the `configure` script recognize Serenity. Also set +`MACHDEP` (which is used for `sys.platform`) to a version-less +`serenityos`, even when not cross-compiling. +--- + configure | 9 ++++++++- + configure.ac | 9 ++++++++- + 2 files changed, 16 insertions(+), 2 deletions(-) + +diff --git a/configure b/configure +index 2e7e0b7..f62120f 100755 +--- a/configure ++++ b/configure +@@ -3335,6 +3335,9 @@ then + # a lot of different things including 'define_xopen_source' + # in the case statement below. + case "$host" in ++ *-*-serenity*) ++ ac_sys_system=SerenityOS ++ ;; + *-*-linux-android*) + ac_sys_system=Linux-android + ;; +@@ -3373,6 +3376,7 @@ then + linux*) MACHDEP="linux";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; ++ serenityos*) MACHDEP="serenityos";; + '') MACHDEP="unknown";; + esac + fi +@@ -3382,6 +3386,9 @@ $as_echo "\"$MACHDEP\"" >&6; } + + if test "$cross_compiling" = yes; then + case "$host" in ++ *-*-serenity*) ++ _host_cpu=$host_cpu ++ ;; + *-*-linux*) + case "$host_cpu" in + arm*) +@@ -9875,7 +9882,7 @@ then + LINKFORSHARED="-Wl,-E -Wl,+s";; + # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; + Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; +- Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; ++ Linux*|GNU*|SerenityOS*) LINKFORSHARED="-Xlinker -export-dynamic";; + # -u libsys_s pulls in all symbols in libsys + Darwin/*) + LINKFORSHARED="$extra_undefs -framework CoreFoundation" +diff --git a/configure.ac b/configure.ac +index 0c06914..383031e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -391,6 +391,9 @@ then + # a lot of different things including 'define_xopen_source' + # in the case statement below. + case "$host" in ++ *-*-serenity*) ++ ac_sys_system=SerenityOS ++ ;; + *-*-linux-android*) + ac_sys_system=Linux-android + ;; +@@ -429,6 +432,7 @@ then + linux*) MACHDEP="linux";; + cygwin*) MACHDEP="cygwin";; + darwin*) MACHDEP="darwin";; ++ serenityos*) MACHDEP="serenityos";; + '') MACHDEP="unknown";; + esac + fi +@@ -437,6 +441,9 @@ AC_MSG_RESULT("$MACHDEP") + AC_SUBST(_PYTHON_HOST_PLATFORM) + if test "$cross_compiling" = yes; then + case "$host" in ++ *-*-serenity*) ++ _host_cpu=$host_cpu ++ ;; + *-*-linux*) + case "$host_cpu" in + arm*) +@@ -2802,7 +2809,7 @@ then + LINKFORSHARED="-Wl,-E -Wl,+s";; + # LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";; + Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";; +- Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";; ++ Linux*|GNU*|SerenityOS*) LINKFORSHARED="-Xlinker -export-dynamic";; + # -u libsys_s pulls in all symbols in libsys + Darwin/*) + LINKFORSHARED="$extra_undefs -framework CoreFoundation" +-- +2.34.1 + |