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

Side by Side Diff: libraries/zlib/build.sh

Issue 52773003: Fix PNaCl build of zlib on buildbot. (Closed) Base URL: https://naclports.googlecode.com/svn/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | 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) 2011 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2011 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 source pkg_info 6 source pkg_info
7 source ../../build_tools/common.sh 7 source ../../build_tools/common.sh
8 8
9 9
10 ConfigureStep() { 10 ConfigureStep() {
11 Banner "Configuring ${PACKAGE_NAME}" 11 Banner "Configuring ${PACKAGE_NAME}"
12 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME} 12 ChangeDir ${NACL_PACKAGES_REPOSITORY}/${PACKAGE_NAME}
13 LogExecute rm -f libz.*
13 # TODO: side-by-side install 14 # TODO: side-by-side install
14 local CONFIGURE_ARGS="--prefix=${NACLPORTS_PREFIX}" 15 local CONFIGURE_ARGS="--prefix=${NACLPORTS_PREFIX}"
15 local CFLAGS="-Dunlink=puts" 16 local CFLAGS="-Dunlink=puts"
16 if [ "${NACL_GLIBC}" = "1" -a $# -gt 0 ]; then 17 if [ "${NACL_GLIBC}" = "1" -a $# -gt 0 ]; then
17 CONFIGURE_ARGS="${CONFIGURE_ARGS} --shared" 18 CONFIGURE_ARGS="${CONFIGURE_ARGS} --shared"
18 CFLAGS="${CFLAGS} -fPIC" 19 CFLAGS="${CFLAGS} -fPIC"
19 fi 20 fi
20 CC=${NACLCC} AR="${NACLAR} -r" RANLIB=${NACLRANLIB} CFLAGS="${CFLAGS}" \ 21 CC=${NACLCC} AR="${NACLAR} -r" RANLIB=${NACLRANLIB} CFLAGS="${CFLAGS}" \
21 LogExecute ./configure ${CONFIGURE_ARGS} 22 LogExecute ./configure ${CONFIGURE_ARGS}
22 export MAKEFLAGS="EXE=${NACL_EXEEXT}" 23 export MAKEFLAGS="EXE=${NACL_EXEEXT}"
23 EXECUTABLES="minigzip${NACL_EXEEXT} example${NACL_EXEEXT}" 24 EXECUTABLES="minigzip${NACL_EXEEXT} example${NACL_EXEEXT}"
24 } 25 }
25 26
26 RunMinigzip() { 27 RunMinigzip() {
27 export LD_LIBRARY_PATH=. 28 export LD_LIBRARY_PATH=.
28 if echo "hello world" | ./minigzip | ./minigzip -d; then 29 if echo "hello world" | ./minigzip | ./minigzip -d; then
29 echo ' *** minigzip test OK ***' ; \ 30 echo ' *** minigzip test OK ***' ; \
30 else 31 else
31 echo ' *** minigzip test FAILED ***' ; \ 32 echo ' *** minigzip test FAILED ***' ; \
32 exit 1 33 exit 1
33 fi 34 fi
35 unset LD_LIBRARY_PATH
34 } 36 }
35 37
36 RunExample() { 38 RunExample() {
37 export LD_LIBRARY_PATH=. 39 export LD_LIBRARY_PATH=.
38 # This second test does not yet work on nacl (gzopen fails) 40 # This second test does not yet work on nacl (gzopen fails)
39 #if ./example; then \ 41 #if ./example; then \
40 #echo ' *** zlib test OK ***'; \ 42 #echo ' *** zlib test OK ***'; \
41 #else \ 43 #else \
42 #echo ' *** zlib test FAILED ***'; \ 44 #echo ' *** zlib test FAILED ***'; \
43 #exit 1 45 #exit 1
44 #fi 46 #fi
45 return 47 unset LD_LIBRARY_PATH
46 } 48 }
47 49
48 TestStep() { 50 TestStep() {
49 if [ "${SKIP_SEL_LDR_TESTS}" = "1" ]; then 51 if [ "${SKIP_SEL_LDR_TESTS}" = "1" ]; then
50 return 52 return
51 fi 53 fi
52 54
53 if [ "${NACL_GLIBC}" = "1" ]; then 55 if [ "${NACL_GLIBC}" = "1" ]; then
54 # Tests do not currently run on GLIBC due to fdopen() not working 56 # Tests do not currently run on GLIBC due to fdopen() not working
55 # TODO(sbc): Remove this once glibc is fixed: 57 # TODO(sbc): Remove this once glibc is fixed:
(...skipping 24 matching lines...) Expand all
80 WriteSelLdrScript example example.nexe 82 WriteSelLdrScript example example.nexe
81 RunExample 83 RunExample
82 fi 84 fi
83 } 85 }
84 86
85 87
86 PackageInstall() { 88 PackageInstall() {
87 PreInstallStep 89 PreInstallStep
88 DownloadStep 90 DownloadStep
89 ExtractStep 91 ExtractStep
90 # zlib doesn't need patching, so no patch step 92 PatchStep
jvoung (off chromium) 2013/10/30 18:26:52 Is this part of a separate change, or is PatchStep
Sam Clegg 2013/10/30 18:28:12 In a no-op when when there is no patch file.
91 ConfigureStep 93 ConfigureStep
92 BuildStep 94 BuildStep
93 ValidateStep 95 ValidateStep
94 TestStep 96 TestStep
95 DefaultInstallStep 97 DefaultInstallStep
96 if [ "${NACL_GLIBC}" = "1" ]; then 98 if [ "${NACL_GLIBC}" = "1" ]; then
97 ConfigureStep shared 99 ConfigureStep shared
98 BuildStep 100 BuildStep
99 Validate libz.so.1 101 Validate libz.so.1
100 ValidateStep 102 ValidateStep
101 TestStep 103 TestStep
102 InstallStep 104 InstallStep
103 fi 105 fi
104 } 106 }
105 107
106 108
107 PackageInstall 109 PackageInstall
108 exit 0 110 exit 0
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698