summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorpxinwr <peixing.xin@windriver.com>2019-02-27 11:09:28 (GMT)
committerVictor Stinner <vstinner@redhat.com>2019-02-27 11:09:28 (GMT)
commit32f5fdd7f4213743fe2f6eedd0fe2108f3157021 (patch)
treef44f12ab017e996649fcbe8ed32216797f8d2ec0 /configure.ac
parent53b9e1a1c1d86187ad6fbee492b697ef8be74205 (diff)
downloadcpython-32f5fdd7f4213743fe2f6eedd0fe2108f3157021.zip
cpython-32f5fdd7f4213743fe2f6eedd0fe2108f3157021.tar.gz
cpython-32f5fdd7f4213743fe2f6eedd0fe2108f3157021.tar.bz2
bpo-31904: Add cross-build support for VxWorks RTOS (GH-11968)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac21
1 files changed, 19 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index c7380ca..73ee71c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -379,6 +379,9 @@ then
*-*-cygwin*)
ac_sys_system=Cygwin
;;
+ *-*-vxworks*)
+ ac_sys_system=VxWorks
+ ;;
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
@@ -423,6 +426,9 @@ if test "$cross_compiling" = yes; then
*-*-cygwin*)
_host_cpu=
;;
+ *-*-vxworks*)
+ _host_cpu=$host_cpu
+ ;;
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
@@ -507,6 +513,11 @@ case $ac_sys_system/$ac_sys_release in
QNX/6.3.2)
define_xopen_source=no
;;
+ # On VxWorks, defining _XOPEN_SOURCE causes compile failures
+ # in network headers still using system V types.
+ VxWorks/*)
+ define_xopen_source=no
+ ;;
esac
@@ -829,6 +840,8 @@ cat >> conftest.c <<EOF
i386-gnu
#elif defined(__APPLE__)
darwin
+#elif defined(__VXWORKS__)
+ vxworks
#else
# error unknown platform triplet
#endif
@@ -2555,7 +2568,7 @@ then
BLDSHARED="$LDSHARED"
fi
;;
- Linux*|GNU*|QNX*)
+ Linux*|GNU*|QNX*|VxWorks*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
FreeBSD*)
@@ -2634,6 +2647,8 @@ then
then CCSHARED="-fPIC"
else CCSHARED="-Kpic -belf"
fi;;
+ VxWorks*)
+ CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
esac
fi
AC_MSG_RESULT($CCSHARED)
@@ -2690,6 +2705,8 @@ then
# to 2048 kilobytes so that the stack doesn't overflow
# when running test_compile.py.
LINKFORSHARED='-Wl,-E -N 2048K';;
+ VxWorks*)
+ LINKFORSHARED='--export-dynamic';;
esac
fi
AC_MSG_RESULT($LINKFORSHARED)
@@ -4578,7 +4595,7 @@ AC_MSG_RESULT($SOABI)
AC_SUBST(EXT_SUFFIX)
case $ac_sys_system in
- Linux*|GNU*|Darwin)
+ Linux*|GNU*|Darwin|VxWorks)
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;