mirror of
https://github.com/RGBCube/serenity
synced 2025-05-25 09:45:08 +00:00
98 lines
2.9 KiB
Diff
98 lines
2.9 KiB
Diff
From 6b7f5908f2d9ca0c3b19fe377feae8f8529e8f4e 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 0cc86f9..45a4ad6 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*)
|
|
@@ -9886,7 +9893,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 547255f..b352890 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*)
|
|
@@ -2807,7 +2814,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.35.1
|
|
|