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.
This commit is contained in:
David CARLIER 2021-09-11 09:46:22 +01:00 committed by GitHub
parent b74c819fab
commit 5f5b7d0c65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -0,0 +1 @@
Fixes Haiku platform build.

View file

@ -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,

View file

@ -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)]),