1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
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
|