From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Linus Groh <mail@linusgroh.de>
Date: Mon, 2 Oct 2023 18:52:35 +0100
Subject: [PATCH] Tweak configure
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
As usual, make the `configure` script recognize Minerva. Also set
`MACHDEP` (which is used for `sys.platform`) to a version-less
`minerva`, even when not cross-compiling.
Co-Authored-By: Julian Offenhäuser <offenhaeuser@protonmail.com>
Co-Authored-By: Oskar Skog <oskar@oskog97.com>
---
configure | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/configure b/configure
index 1cd1f690f7b9c11c51cf4f84e64af82638e6b6a6..2c14ae6b377419ae0c782324301dd1b619e056bc 100755
--- a/configure
+++ b/configure
@@ -4046,6 +4046,9 @@ then
# a lot of different things including 'define_xopen_source'
# in the case statement below.
case "$host" in
+ *-*-minerva*)
+ ac_sys_system=Minerva
+ ;;
*-*-linux-android*)
ac_sys_system=Linux-android
;;
@@ -4094,6 +4097,7 @@ then
linux*) MACHDEP="linux";;
cygwin*) MACHDEP="cygwin";;
darwin*) MACHDEP="darwin";;
+ minerva*) MACHDEP="minerva";;
'') MACHDEP="unknown";;
esac
@@ -4491,6 +4495,9 @@ fi
if test "$cross_compiling" = yes; then
case "$host" in
+ *-*-minerva*)
+ _host_cpu=$host_cpu
+ ;;
*-*-linux*)
case "$host_cpu" in
arm*)
@@ -7587,7 +7594,7 @@ printf "%s\n" "#define Py_ENABLE_SHARED 1" >>confdefs.h
PY3LIBRARY=libpython3.so
fi
;;
- Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*)
+ Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*|OpenBSD*|VxWorks*|Minerva*)
LDLIBRARY='libpython$(LDVERSION).so'
BLDLIBRARY='-L. -lpython$(LDVERSION)'
RUNSHARED=LD_LIBRARY_PATH=`pwd`${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
@@ -13068,7 +13075,7 @@ then
then CCSHARED="-fPIC";
else CCSHARED="+z";
fi;;
- Linux*|GNU*) CCSHARED="-fPIC";;
+ Linux*|GNU*|Minerva*) CCSHARED="-fPIC";;
Emscripten*|WASI*)
if test "x$enable_wasm_dynamic_linking" = xyes
then :
@@ -13106,7 +13113,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*|Minerva*) LINKFORSHARED="-Xlinker -export-dynamic";;
# -u libsys_s pulls in all symbols in libsys
Darwin/*|iOS/*)
LINKFORSHARED="$extra_undefs -framework CoreFoundation"