2 # Copyright (c) 2009 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that be
4 # found in the LICENSE file.
9 # usage: nacl-runtime-mono.sh
11 # this script builds mono runtime for Native Client
14 readonly MONO_TRUNK_NACL
=$
(pwd)
18 readonly PACKAGE_NAME
=runtime
${TARGET_BIT_PREFIX}-build
19 readonly INSTALL_PATH
=${MONO_TRUNK_NACL}/naclmono-
${CROSS_ID}
22 CustomConfigureStep
() {
23 Banner
"Configuring ${PACKAGE_NAME}"
24 # export the nacl tools
26 if [ -f ${PACKAGE_NAME}/Makefile
]
33 if [ $TARGET_BITSIZE == "32" ]; then
34 CONFIG_OPTS
="--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
36 CONFIG_OPTS
="--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu"
38 # UGLY hack to allow dynamic linking
39 sed -i -e s
/elf_i386
/elf_nacl
/ -e s
/elf_x86_64
/elf64_nacl
/ ..
/configure
40 sed -i -e s
/elf_i386
/elf_nacl
/ -e s
/elf_x86_64
/elf64_nacl
/ ..
/libgc
/configure
41 sed -i -e s
/elf_i386
/elf_nacl
/ -e s
/elf_x86_64
/elf64_nacl
/ ..
/eglib
/configure
42 Remove
${PACKAGE_NAME}
43 MakeDir
${PACKAGE_NAME}
45 CC
=${NACLCC} CXX=${NACLCXX} AR=${NACLAR} RANLIB=${NACLRANLIB} PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig LD="${NACLLD}" \
46 PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} PATH=${NACL_BIN_PATH}:${PATH} LIBS="-lnacl_dyncode -lc -lg -lnosys -lnacl" \
47 CFLAGS="-g -O2 -D_POSIX_PATH_MAX=256 -DPATH_MAX=256" ../../configure \
49 --exec-prefix=${INSTALL_PATH} \
50 --libdir=${INSTALL_PATH}/lib \
51 --prefix=${INSTALL_PATH} \
53 --oldincludedir=${INSTALL_PATH}/include \
54 --with-glib=embedded \
56 --enable-threads=posix \
57 --without-sigaltstack \
63 --enable-nacl-codegen \
64 --disable-system-aot \
66 --disable-parallel-mark \
75 CustomPackageInstall() {