1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00
serenity/Ports/python3/patches/fix-autoconf.patch
2021-07-07 20:24:48 +01:00

79 lines
2.1 KiB
Diff

--- Python-3.9.6/config.sub 2021-02-21 20:22:43.901024503 +0100
+++ Python-3.9.6/config.sub 2021-02-21 20:24:35.079400552 +0100
@@ -1485,6 +1485,8 @@
-oss*)
os=-sysv3
;;
+ -serenity*)
+ ;;
-svr4*)
os=-sysv4
;;
--- Python-3.9.6/configure.ac 2021-05-03 15:54:42.000000000 +0100
+++ Python-3.9.6/configure.ac 2021-05-06 16:40:34.503092204 +0100
@@ -391,6 +391,9 @@
# 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 @@
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
+ serenityos*) MACHDEP="serenityos";;
'') MACHDEP="unknown";;
esac
fi
@@ -437,6 +441,9 @@
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*)
--- Python-3.9.6/configure 2021-07-07 19:12:57.444219201 +0100
+++ Python-3.9.6/configure 2021-07-07 19:14:55.184825202 +0100
@@ -3295,6 +3295,9 @@
# 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
;;
@@ -3333,6 +3336,7 @@
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
+ serenityos*) MACHDEP="serenityos";;
'') MACHDEP="unknown";;
esac
fi
@@ -3342,6 +3346,9 @@
if test "$cross_compiling" = yes; then
case "$host" in
+ *-*-serenity*)
+ _host_cpu=$host_cpu
+ ;;
*-*-linux*)
case "$host_cpu" in
arm*)
@@ -9649,6 +9656,7 @@
# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Linux-android*) LINKFORSHARED="-pie -Xlinker -export-dynamic";;
Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
+ SerenityOS*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
Darwin/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"