[Python-checkins] bpo-45163: Haiku build fix. (GH-28269)
serhiy-storchaka
webhook-mailer at python.org
Sat Sep 11 04:46:33 EDT 2021
https://github.com/python/cpython/commit/5f5b7d0c654488206ac13e27d9a5dcffbd2cc0af
commit: 5f5b7d0c654488206ac13e27d9a5dcffbd2cc0af
branch: main
author: David CARLIER <devnexen at gmail.com>
committer: serhiy-storchaka <storchaka at gmail.com>
date: 2021-09-11T11:46:22+03:00
summary:
bpo-45163: Haiku build fix. (GH-28269)
linkage issues mainly for shared libs and missing system library,
also little nit into the signal extension as strsignal returns
a constant in this platform.
files:
A Misc/NEWS.d/next/Build/2021-09-11-06-05-23.bpo-45163.q7xT93.rst
M Modules/signalmodule.c
M configure.ac
diff --git a/Misc/NEWS.d/next/Build/2021-09-11-06-05-23.bpo-45163.q7xT93.rst b/Misc/NEWS.d/next/Build/2021-09-11-06-05-23.bpo-45163.q7xT93.rst
new file mode 100644
index 0000000000000..2b656bcbc230b
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2021-09-11-06-05-23.bpo-45163.q7xT93.rst
@@ -0,0 +1 @@
+Fixes Haiku platform build.
\ No newline at end of file
diff --git a/Modules/signalmodule.c b/Modules/signalmodule.c
index 243c8c82cdc64..fc58cfd2084c7 100644
--- a/Modules/signalmodule.c
+++ b/Modules/signalmodule.c
@@ -611,7 +611,7 @@ static PyObject *
signal_strsignal_impl(PyObject *module, int signalnum)
/*[clinic end generated code: output=44e12e1e3b666261 input=b77914b03f856c74]*/
{
- char *res;
+ const char *res;
if (signalnum < 1 || signalnum >= NSIG) {
PyErr_SetString(PyExc_ValueError,
diff --git a/configure.ac b/configure.ac
index e01e0c13fba19..bcb205497c1ea 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2736,7 +2736,7 @@ then
BLDSHARED="$LDSHARED"
fi
;;
- Linux*|GNU*|QNX*|VxWorks*)
+ Linux*|GNU*|QNX*|VxWorks*|Haiku*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
FreeBSD*)
@@ -2805,6 +2805,7 @@ then
Linux-android*) ;;
Linux*|GNU*) CCSHARED="-fPIC";;
FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
+ Haiku*) CCSHARED="-fPIC";;
OpenUNIX*|UnixWare*)
if test "$GCC" = "yes"
then CCSHARED="-fPIC"
@@ -3098,6 +3099,9 @@ AC_SUBST(TZPATH)
AC_CHECK_LIB(nsl, t_open, [LIBS="-lnsl $LIBS"]) # SVR4
AC_CHECK_LIB(socket, socket, [LIBS="-lsocket $LIBS"], [], $LIBS) # SVR4 sockets
+# Haiku system library
+AC_CHECK_LIB(network, socket, [LIBS="-lnetwork $LIBS"], [], $LIBS)
+
AC_MSG_CHECKING(for --with-libs)
AC_ARG_WITH(libs,
AS_HELP_STRING([--with-libs='lib1 ...'], [link against additional libs (default is no)]),
More information about the Python-checkins
mailing list