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

Side by Side Diff: examples/tools/thttpd-2.25b/nacl-thttpd-2.25b.sh

Issue 11636027: Add ARM toolchain support. (Closed) Base URL: git@github.com:samclegg/naclports.git@sbc
Patch Set: revert .c file change 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
« no previous file with comments | « examples/tools/thttpd-2.25b/gen_nmf.sh ('k') | examples/tutorials/life/life-stage-4/Makefile » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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-thttpd-2.25.sh 7 # nacl-thttpd-2.25.sh
8 # 8 #
9 # Usage: nacl-thttpd-2.25.sh 9 # Usage: nacl-thttpd-2.25.sh
10 # 10 #
(...skipping 25 matching lines...) Expand all
36 cp -f ${START_DIR}/${FILE} . 36 cp -f ${START_DIR}/${FILE} .
37 done 37 done
38 } 38 }
39 39
40 CustomBuildStep() { 40 CustomBuildStep() {
41 Banner "Building ${PACKAGE_NAME}" 41 Banner "Building ${PACKAGE_NAME}"
42 # export the nacl tools 42 # export the nacl tools
43 export CC=${NACLCC} 43 export CC=${NACLCC}
44 export NACLXX=${NACLCXX} 44 export NACLXX=${NACLCXX}
45 export CXX=${NACLCXX} 45 export CXX=${NACLCXX}
46 if [ ${NACL_PACKAGES_BITSIZE} == "pnacl" ] ; then 46 if [ ${NACL_ARCH} = "pnacl" ] ; then
47 export NACL_CCFLAGS="-O3 -g" 47 export NACL_CCFLAGS="-O3 -g"
48 export NACL_LDFLAGS="-O0 -static" 48 export NACL_LDFLAGS="-O0 -static"
49 fi 49 fi
50 export AR=${NACLAR} 50 export AR=${NACLAR}
51 export RANLIB=${NACLRANLIB} 51 export RANLIB=${NACLRANLIB}
52 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig 52 export PKG_CONFIG_PATH=${NACL_SDK_USR_LIB}/pkgconfig
53 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB} 53 export PKG_CONFIG_LIBDIR=${NACL_SDK_USR_LIB}
54 export PATH=${NACL_BIN_PATH}:${PATH}; 54 export PATH=${NACL_BIN_PATH}:${PATH};
55 local PACKAGE_DIR="${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}" 55 local PACKAGE_DIR="${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}"
56 ChangeDir ${PACKAGE_DIR} 56 ChangeDir ${PACKAGE_DIR}
57 make thttpd 57 make thttpd
58 } 58 }
59 59
60 CustomInstallStep() { 60 CustomInstallStep() {
61 PUBLISH_DIR="${NACL_PACKAGES_PUBLISH}/${PACKAGE_NAME}" 61 PUBLISH_DIR="${NACL_PACKAGES_PUBLISH}/${PACKAGE_NAME}"
62 local PACKAGE_DIR="${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}" 62 local PACKAGE_DIR="${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}"
63 MakeDir ${PUBLISH_DIR} 63 MakeDir ${PUBLISH_DIR}
64 install ${START_DIR}/thttpd.html ${PUBLISH_DIR} 64 install ${START_DIR}/thttpd.html ${PUBLISH_DIR}
65 install ${START_DIR}/nacl.js ${PUBLISH_DIR} 65 install ${START_DIR}/nacl.js ${PUBLISH_DIR}
66 install ${START_DIR}/peppermount_helper.js ${PUBLISH_DIR} 66 install ${START_DIR}/peppermount_helper.js ${PUBLISH_DIR}
67 install ${START_DIR}/json2min.js ${PUBLISH_DIR} 67 install ${START_DIR}/json2min.js ${PUBLISH_DIR}
68 BUILD_DIR=${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} 68 BUILD_DIR=${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}
69 cp ${BUILD_DIR}/thttpd ${BUILD_DIR}/thttpd_x86-${NACL_PACKAGES_BITSIZE}.nexe 69 cp ${BUILD_DIR}/thttpd ${BUILD_DIR}/thttpd_${NACL_ARCH}.nexe
70 install ${BUILD_DIR}/thttpd_x86-${NACL_PACKAGES_BITSIZE}.nexe \ 70 install ${BUILD_DIR}/thttpd_${NACL_ARCH}.nexe \
71 ${PUBLISH_DIR}/thttpd_x86-${NACL_PACKAGES_BITSIZE}.nexe 71 ${PUBLISH_DIR}/thttpd_${NACL_ARCH}.nexe
72 ChangeDir ${PUBLISH_DIR} 72 ChangeDir ${PUBLISH_DIR}
73 local NACL_LIB_PATH=$NACL_TOOLCHAIN_ROOT/x86_64-nacl 73 local NACL_LIB_PATH=$NACL_TOOLCHAIN_ROOT/x86_64-nacl
74 local NACL_COMPLEMENT_BITSIZE=64 74 local NACL_COMPLEMENT_ARCH="x86_64"
75 if [ ${NACL_PACKAGES_BITSIZE} == "64" ]; then 75 local NACL_COMPLEMENT_LIBDDIR="lib64"
76 NACL_COMPLEMENT_BITSIZE=32 76 if [ ${NACL_ARCH} = "x86_64" ]; then
77 NACL_COMPLEMENT_ARCH="i686"
78 NACL_COMPLEMENT_LIBDIR="lib32"
77 fi 79 fi
78 if [ -f thttpd_x86-${NACL_COMPLEMENT_BITSIZE}.nexe ]; then 80 if [ -f thttpd_${NACL_COMPLEMENT_ARCH}.nexe ]; then
79 $NACL_SDK_ROOT/tools/create_nmf.py \ 81 $NACL_SDK_ROOT/tools/create_nmf.py \
80 -L$NACL_LIB_PATH/usr/lib$NACL_COMPLEMENT_BITSIZE \ 82 -L$NACL_LIB_PATH/usr/lib$NACL_COMPLEMENT_LIBDIR \
81 -L$NACL_LIB_PATH/lib$NACL_COMPLEMENT_BITSIZE \ 83 -L$NACL_LIB_PATH/lib$NACL_COMPLEMENT_LIBDIR \
82 -L$NACL_LIB_PATH/usr/lib$NACL_PACKAGES_BITSIZE \ 84 -L$NACL_LIB_PATH/usr/$NACL_LIBDIR \
83 -L$NACL_LIB_PATH/lib$NACL_PACKAGES_BITSIZE \ 85 -L$NACL_LIB_PATH/$NACL_LIBDIR \
84 -D$NACL_BIN_PATH/x86_64-nacl-objdump \ 86 -D$NACL_BIN_PATH/x86_64-nacl-objdump \
85 -o thttpd.nmf -s . \ 87 -o thttpd.nmf -s . \
86 thttpd_x86-${NACL_COMPLEMENT_BITSIZE}.nexe \ 88 thttpd_${NACL_ARCH}.nexe \
87 thttpd_x86-${NACL_PACKAGES_BITSIZE}.nexe 89 thttpd_${NACL_COMPLEMENT_ARCH}.nexe
88 else 90 else
89 $NACL_SDK_ROOT/tools/create_nmf.py \ 91 $NACL_SDK_ROOT/tools/create_nmf.py \
90 -L$NACL_LIB_PATH/usr/lib$NACL_PACKAGES_BITSIZE \ 92 -L$NACL_LIB_PATH/usr/$NACL_LIBDIR \
91 -L$NACL_LIB_PATH/lib$NACL_PACKAGES_BITSIZE \ 93 -L$NACL_LIB_PATH/$NACL_LIBDIR \
92 -D$NACL_BIN_PATH/x86_64-nacl-objdump \ 94 -D$NACL_BIN_PATH/x86_64-nacl-objdump \
93 -o thttpd.nmf -s . \ 95 -o thttpd.nmf -s . \
94 thttpd_x86-${NACL_PACKAGES_BITSIZE}.nexe 96 thttpd_${NACL_ARCH}.nexe
95 fi 97 fi
96 DefaultTouchStep 98 DefaultTouchStep
97 } 99 }
98 100
99 CustomPackageInstall() { 101 CustomPackageInstall() {
100 DefaultPreInstallStep 102 DefaultPreInstallStep
101 DefaultDownloadStep 103 DefaultDownloadStep
102 DefaultExtractStep 104 DefaultExtractStep
103 DefaultPatchStep 105 DefaultPatchStep
104 PreConfigureStep 106 PreConfigureStep
105 CustomBuildStep 107 CustomBuildStep
106 CustomInstallStep 108 CustomInstallStep
107 DefaultCleanUpStep 109 DefaultCleanUpStep
108 } 110 }
109 111
110 CustomPackageInstall 112 CustomPackageInstall
111 exit 0 113 exit 0
OLDNEW
« no previous file with comments | « examples/tools/thttpd-2.25b/gen_nmf.sh ('k') | examples/tutorials/life/life-stage-4/Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698