-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path2configure_zpython.sh
More file actions
27 lines (23 loc) · 923 Bytes
/
2configure_zpython.sh
File metadata and controls
27 lines (23 loc) · 923 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
NACL_TOOLCHAIN=${NACL_SDK_ROOT}/toolchain/linux_x86_glibc
export PATH=${PATH}:${NACL_TOOLCHAIN}/bin
#configure cpython to be built statically, also overrided LINKFORSHARED variable,
#although rest variables has been set to link it statically by nacl-gcc
export PYTHONPATH="${ZPYTHON_ROOT}/Modules:$${ZPYTHON_ROOT}/Lib:${ZPYTHON_ROOT}"
export LINKFORSHARED=\
"-s -static -T ${NACL_TOOLCHAIN}/x86_64-nacl/lib64/ldscripts/elf64_nacl.x.static \
-melf64_nacl -m64 -L${ZRT_ROOT}/lib -lzrt -lfs -lstdc++ -lzglibc"
export CC="x86_64-nacl-gcc"
export CXX="x86_64-naclg++"
export AR="x86_64-nacl-ar"
export RANLIB="x86_64-nacl-ranlib"
export LD_LIBRARY_PATH=${NACL_TOOLCHAIN}"/x86_64-nacl/lib"
export CFLAGS="-I${ZRT_ROOT}/lib "
export LDFLAGS=" -s -static -static-libgcc"
export LIBC="-lzglibc"
./configure \
--host=x86_64-nacl \
--build=x86_64-linux-gnu \
--prefix=/python \
--without-threads \
--enable-shared=no