summaryrefslogtreecommitdiffstats
path: root/configure
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
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')
-rwxr-xr-xconfigure21
1 files changed, 19 insertions, 2 deletions
diff --git a/configure b/configure
index d98d14a..d0ef8a6 100755
--- a/configure
+++ b/configure
@@ -3268,6 +3268,9 @@ then
*-*-cygwin*)
ac_sys_system=Cygwin
;;
+ *-*-vxworks*)
+ ac_sys_system=VxWorks
+ ;;
*)
# for now, limit cross builds to known configurations
MACHDEP="unknown"
@@ -3312,6 +3315,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"
@@ -3399,6 +3405,11 @@ $as_echo "#define _BSD_SOURCE 1" >>confdefs.h
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
@@ -5283,6 +5294,8 @@ cat >> conftest.c <<EOF
i386-gnu
#elif defined(__APPLE__)
darwin
+#elif defined(__VXWORKS__)
+ vxworks
#else
# error unknown platform triplet
#endif
@@ -9391,7 +9404,7 @@ then
BLDSHARED="$LDSHARED"
fi
;;
- Linux*|GNU*|QNX*)
+ Linux*|GNU*|QNX*|VxWorks*)
LDSHARED='$(CC) -shared'
LDCXXSHARED='$(CXX) -shared';;
FreeBSD*)
@@ -9472,6 +9485,8 @@ then
then CCSHARED="-fPIC"
else CCSHARED="-Kpic -belf"
fi;;
+ VxWorks*)
+ CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
esac
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCSHARED" >&5
@@ -9530,6 +9545,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
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINKFORSHARED" >&5
@@ -15079,7 +15096,7 @@ $as_echo "$SOABI" >&6; }
case $ac_sys_system in
- Linux*|GNU*|Darwin)
+ Linux*|GNU*|Darwin|VxWorks)
EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
*)
EXT_SUFFIX=${SHLIB_SUFFIX};;