blob: d93bb97546375ed1cafb2444c42d312480d7314e (
plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
#!/bin/bash
# Copyright (c) 2009 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that be
# found in the LICENSE file.
#
# nacl-runtime-mono.sh
#
# usage: nacl-runtime-mono.sh
#
# this script builds mono runtime for Native Client
#
readonly MONO_TRUNK_NACL=$(pwd)
source common.sh
readonly PACKAGE_NAME=runtime${TARGET_BIT_PREFIX}-build
readonly INSTALL_PATH=${MONO_TRUNK_NACL}/naclmono-${CROSS_ID}
CustomConfigureStep() {
Banner "Configuring ${PACKAGE_NAME}"
# export the nacl tools
set +e
if [ -f ${PACKAGE_NAME}/Makefile ]
then
cd ${PACKAGE_NAME}
fi
make distclean
cd ${MONO_TRUNK_NACL}
set -e
if [ $TARGET_BITSIZE == "32" ]; then
CONFIG_OPTS="--host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --target=i686-pc-linux-gnu"
else
CONFIG_OPTS="--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu"
fi
# UGLY hack to allow dynamic linking
sed -i -e s/elf_i386/elf_nacl/ -e s/elf_x86_64/elf64_nacl/ ../configure
sed -i -e s/elf_i386/elf_nacl/ -e s/elf_x86_64/elf64_nacl/ ../libgc/configure
sed -i -e s/elf_i386/elf_nacl/ -e s/elf_x86_64/elf64_nacl/ ../eglib/configure
Remove ${PACKAGE_NAME}
MakeDir ${PACKAGE_NAME}
cd ${PACKAGE_NAME}
CC=${NACLCC} CXX=${NACLCXX} AR=${NACLAR} RANLIB=${NACLRANLIB} PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig LD="${NACLLD}" \
PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} PATH=${NACL_BIN_PATH}:${PATH} LIBS="-lnacl_dyncode -lc -lg -lnosys -lnacl" \
CFLAGS="-g -O2 -D_POSIX_PATH_MAX=256 -DPATH_MAX=256" ../../configure \
${CONFIG_OPTS} \
--exec-prefix=${INSTALL_PATH} \
--libdir=${INSTALL_PATH}/lib \
--prefix=${INSTALL_PATH} \
--program-prefix="" \
--oldincludedir=${INSTALL_PATH}/include \
--with-glib=embedded \
--with-tls=pthread \
--enable-threads=posix \
--without-sigaltstack \
--without-mmap \
--with-gc=included \
--enable-nacl-gc \
--with-sgen=no \
--enable-nls=no \
--enable-nacl-codegen \
--disable-system-aot \
--enable-shared \
--disable-parallel-mark \
--with-static-mono=no
}
CustomInstallStep() {
make install
}
CustomPackageInstall() {
CustomConfigureStep
DefaultBuildStep
CustomInstallStep
}
CustomPackageInstall
exit 0
|