[io-layer] Remove io-layer.h include from as many headers as possible (#4088)
[mono-project.git] / nacl / nacl-runtime-mono.sh
blobd93bb97546375ed1cafb2444c42d312480d7314e
1 #!/bin/bash
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.
7 # nacl-runtime-mono.sh
9 # usage: nacl-runtime-mono.sh
11 # this script builds mono runtime for Native Client
14 readonly MONO_TRUNK_NACL=$(pwd)
16 source common.sh
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
25 set +e
26 if [ -f ${PACKAGE_NAME}/Makefile ]
27 then
28 cd ${PACKAGE_NAME}
30 make distclean
31 cd ${MONO_TRUNK_NACL}
32 set -e
33 if [ $TARGET_BITSIZE == "32" ]; then
34 CONFIG_OPTS="--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
35 else
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}
44 cd ${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 \
48 ${CONFIG_OPTS} \
49 --exec-prefix=${INSTALL_PATH} \
50 --libdir=${INSTALL_PATH}/lib \
51 --prefix=${INSTALL_PATH} \
52 --program-prefix="" \
53 --oldincludedir=${INSTALL_PATH}/include \
54 --with-glib=embedded \
55 --with-tls=pthread \
56 --enable-threads=posix \
57 --without-sigaltstack \
58 --without-mmap \
59 --with-gc=included \
60 --enable-nacl-gc \
61 --with-sgen=no \
62 --enable-nls=no \
63 --enable-nacl-codegen \
64 --disable-system-aot \
65 --enable-shared \
66 --disable-parallel-mark \
67 --with-static-mono=no
71 CustomInstallStep() {
72 make install
75 CustomPackageInstall() {
76 CustomConfigureStep
77 DefaultBuildStep
78 CustomInstallStep
81 CustomPackageInstall
82 exit 0