Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Side by Side Diff: examples/systems/bochs-2.4.6/nacl-bochs-2.4.6.sh

Issue 11885025: Allow re-targeting of naclports install (Closed) Base URL: http://naclports.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 # 5 #
6 6
7 # nacl-bochs-2.4.6.sh 7 # nacl-bochs-2.4.6.sh
8 # 8 #
9 # usage: nacl-bochs-2.4.6.sh 9 # usage: nacl-bochs-2.4.6.sh
10 # 10 #
(...skipping 13 matching lines...) Expand all
24 source ../../../build_tools/common.sh 24 source ../../../build_tools/common.sh
25 25
26 BOCHS_EXAMPLE_DIR=${NACL_SRC}/examples/systems/bochs-2.4.6 26 BOCHS_EXAMPLE_DIR=${NACL_SRC}/examples/systems/bochs-2.4.6
27 27
28 CustomConfigureStep() { 28 CustomConfigureStep() {
29 Banner "Configuring ${PACKAGE_NAME}" 29 Banner "Configuring ${PACKAGE_NAME}"
30 # export the nacl tools 30 # export the nacl tools
31 export CC=${NACLCC} 31 export CC=${NACLCC}
32 export CXX=${NACLCXX} 32 export CXX=${NACLCXX}
33 export CXXFLAGS="-O2 -g -I${NACL_SDK_ROOT}/include" 33 export CXXFLAGS="-O2 -g -I${NACL_SDK_ROOT}/include"
34 export LDFLAGS="" 34 export LDFLAGS="${NACLPORTS_LDFLAGS}"
35 if [ ${NACL_ARCH} = "pnacl" ] ; then 35 if [ ${NACL_ARCH} = "pnacl" ] ; then
36 export CXXFLAGS="-O3 -g" 36 export CXXFLAGS="-O3 -g"
37 export LDFLAGS="-O0 -static" 37 export LDFLAGS="-O0 -static"
38 fi 38 fi
39 export AR=${NACLAR} 39 export AR=${NACLAR}
40 export RANLIB=${NACLRANLIB} 40 export RANLIB=${NACLRANLIB}
41 # path and package magic to make sure we call the right 41 # path and package magic to make sure we call the right
42 # sdl-config, etc. 42 # sdl-config, etc.
43 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig 43 export PKG_CONFIG_PATH=${NACLPORTS_LIBDIR}/pkgconfig
44 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} 44 export PKG_CONFIG_LIBDIR=${NACLPORTS_LIBDIR}
45 export PATH=${NACL_BIN_PATH}:${PATH}; 45 export PATH=${NACL_BIN_PATH}:${PATH};
46 export PATH="${NACL_SDK_USR_BIN}:${PATH}" 46 export PATH="${NACLPORTS_PREFIX_BIN}:${PATH}"
47 47
48 export NACLBXLIBS="-lnacl-mounts -lpthread" 48 export NACLBXLIBS="-lnacl-mounts -lpthread"
49 49
50 # Hacky way of getting around the bochs configuration tools which don't allow 50 # Hacky way of getting around the bochs configuration tools which don't allow
51 # --whole-archive and don't allow for multiple libraries with the same name 51 # --whole-archive and don't allow for multiple libraries with the same name
52 # on the linker line 52 # on the linker line
53 PWD=$(pwd) 53 PWD=$(pwd)
54 # TODO(bradnelson): take this out once the sdk is fixed (and do the line 54 # TODO(bradnelson): take this out once the sdk is fixed (and do the line
55 # after). 55 # after).
56 if [ "$NACL_ARCH" = "x86_64" ]; then 56 if [ "$NACL_ARCH" = "x86_64" ]; then
(...skipping 22 matching lines...) Expand all
79 fi 79 fi
80 export LIBS="$LIBS -Wl,--end-group" 80 export LIBS="$LIBS -Wl,--end-group"
81 81
82 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} 82 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}
83 Remove ${PACKAGE_NAME}-build 83 Remove ${PACKAGE_NAME}-build
84 MakeDir ${PACKAGE_NAME}-build 84 MakeDir ${PACKAGE_NAME}-build
85 cd ${PACKAGE_NAME}-build 85 cd ${PACKAGE_NAME}-build
86 ../configure \ 86 ../configure \
87 --host=nacl \ 87 --host=nacl \
88 --disable-shared \ 88 --disable-shared \
89 --prefix=${NACL_SDK_USR} \ 89 --prefix=${NACLPORTS_PREFIX} \
90 --exec-prefix=${NACL_SDK_USR} \ 90 --exec-prefix=${NACLPORTS_PREFIX} \
91 --libdir=${NACL_SDK_USR_LIB} \ 91 --libdir=${NACLPORTS_LIBDIR} \
92 --oldincludedir=${NACL_SDK_USR_INCLUDE} \ 92 --oldincludedir=${NACLPORTS_INCLUDE} \
93 --with-x=no \ 93 --with-x=no \
94 --with-x11=no \ 94 --with-x11=no \
95 --with-sdl=yes \ 95 --with-sdl=yes \
96 --with-gnu-ld 96 --with-gnu-ld
97 } 97 }
98 98
99 CustomExtractStep(){ 99 CustomExtractStep(){
100 Banner "Untaring ${PACKAGE_NAME}.tar.gz" 100 Banner "Untaring ${PACKAGE_NAME}.tar.gz"
101 ChangeDir ${NACL_PACKAGES_REPOSITORY} 101 ChangeDir ${NACL_PACKAGES_REPOSITORY}
102 Remove ${PACKAGE_NAME} 102 Remove ${PACKAGE_NAME}
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 DefaultBuildStep 213 DefaultBuildStep
214 if [ ${NACL_ARCH} = "pnacl" ] ; then 214 if [ ${NACL_ARCH} = "pnacl" ] ; then
215 DefaultTranslateStep ${PACKAGE_NAME} ${PACKAGE_NAME}-build/bochs 215 DefaultTranslateStep ${PACKAGE_NAME} ${PACKAGE_NAME}-build/bochs
216 fi 216 fi
217 CustomInstallStep 217 CustomInstallStep
218 DefaultCleanUpStep 218 DefaultCleanUpStep
219 } 219 }
220 220
221 CustomPackageInstall 221 CustomPackageInstall
222 exit 0 222 exit 0
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698