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

Side by Side Diff: ports/perl/build.sh

Issue 1804293003: Add support for new pnacl native toolchain driver (Closed) Base URL: https://chromium.googlesource.com/webports.git@master
Patch Set: Fix according to Brad's comments Created 4 years, 7 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
OLDNEW
1 # Copyright (c) 2015 The Native Client Authors. All rights reserved. 1 # Copyright (c) 2015 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # falling back to cc for generating build time artifacts 5 # falling back to cc for generating build time artifacts
6 export BUILD_CC=cc 6 export BUILD_CC=cc
7 export BUILD_LD=cc 7 export BUILD_LD=cc
8 # use -Wno-return-type to suppress return-type errors encountered 8 # use -Wno-return-type to suppress return-type errors encountered
9 # with pnacl, arm's clang-newlib (microperl) 9 # with pnacl, arm's clang-newlib (microperl)
10 NACLPORTS_CFLAGS_MICRO=$NACLPORTS_CFLAGS 10 NACLPORTS_CFLAGS_MICRO=$NACLPORTS_CFLAGS
11 NACLPORTS_CFLAGS_MICRO+=" -Wno-return-type " 11 NACLPORTS_CFLAGS_MICRO+=" -Wno-return-type "
12 NACLPORTS_CFLAGS+=" -I${NACL_SDK_ROOT}/include -I${NACLPORTS_INCLUDE} \ 12 NACLPORTS_CFLAGS+=" -I${NACL_SDK_ROOT}/include -isystem${NACLPORTS_INCLUDE} \
13 -Wno-return-type" 13 -Wno-return-type"
14 BUILD_DIR=${SRC_DIR} 14 BUILD_DIR=${SRC_DIR}
15 # keeping microperl for now 15 # keeping microperl for now
16 EXECUTABLES="perl microperl" 16 EXECUTABLES="perl microperl"
17 # we need a working perl on host to build things for target 17 # we need a working perl on host to build things for target
18 HOST_BUILD=${WORK_DIR}/build_host 18 HOST_BUILD=${WORK_DIR}/build_host
19 ARCH_DIR=${PUBLISH_DIR}/${NACL_ARCH} 19 ARCH_DIR=${PUBLISH_DIR}/${NACL_ARCH}
20 # PNaCl and newlib dont have dynamic loading, so 20 # PNaCl and newlib dont have dynamic loading, so
21 # using Perl's internal stub file dl_none.xs 21 # using Perl's internal stub file dl_none.xs
22 # specifically for systems which do not support it 22 # specifically for systems which do not support it
23 # Also, FILE pointer is structured a bit differently 23 # Also, FILE pointer is structured a bit differently
24 # Relevant stdio parameters found via sel_ldr on Linux 24 # Relevant stdio parameters found via sel_ldr on Linux
25 if [ "${NACL_LIBC}" = "newlib" -o "${NACL_ARCH}" = "pnacl" ] ; then 25 if [ "${NACL_LIBC}" = "newlib" -o "${NACL_ARCH}" = "pnacl" \
26 -o "${NACL_ARCH}" = "le32" ] ; then
26 NACLPORTS_LIBS+=" -lm -ltar" 27 NACLPORTS_LIBS+=" -lm -ltar"
27 DYNAMIC_EXT="" 28 DYNAMIC_EXT=""
28 NACL_GLIBC_DEF="undef" 29 NACL_GLIBC_DEF="undef"
29 PERL_STDIO_BASE="(((fp)->_bf)._base)" 30 PERL_STDIO_BASE="(((fp)->_bf)._base)"
30 PERL_STDIO_BUFSIZ="(((fp)->_bf)._size)" 31 PERL_STDIO_BUFSIZ="(((fp)->_bf)._size)"
31 PERL_STDIO_CNT="" 32 PERL_STDIO_CNT=""
32 PERL_STDIO_PTR="((fp)->_p)" 33 PERL_STDIO_PTR="((fp)->_p)"
33 PERL_DLSRC="dl_none.xs" 34 PERL_DLSRC="dl_none.xs"
34 NACLPORTS_CCDLFLAGS="" 35 NACLPORTS_CCDLFLAGS=""
35 else 36 else
(...skipping 11 matching lines...) Expand all
47 NACL_GLIBC_DEF="define" 48 NACL_GLIBC_DEF="define"
48 PERL_STDIO_BASE="((fp)->_IO_read_base)" 49 PERL_STDIO_BASE="((fp)->_IO_read_base)"
49 PERL_STDIO_BUFSIZ="((fp)->_IO_read_end - (fp)->_IO_read_base)" 50 PERL_STDIO_BUFSIZ="((fp)->_IO_read_end - (fp)->_IO_read_base)"
50 PERL_STDIO_CNT="((fp)->_IO_read_end - (fp)->_IO_read_ptr)" 51 PERL_STDIO_CNT="((fp)->_IO_read_end - (fp)->_IO_read_ptr)"
51 PERL_STDIO_PTR="((fp)->_IO_read_ptr)" 52 PERL_STDIO_PTR="((fp)->_IO_read_ptr)"
52 PERL_DLSRC="dl_dlopen.xs" 53 PERL_DLSRC="dl_dlopen.xs"
53 NACLPORTS_CCDLFLAGS="-Wl,-E" 54 NACLPORTS_CCDLFLAGS="-Wl,-E"
54 fi 55 fi
55 # include Errno in pnacl 56 # include Errno in pnacl
56 NONXS_EXT="" 57 NONXS_EXT=""
57 if [ "${NACL_ARCH}" = "pnacl" ] ; then 58 if [ "${NACL_ARCH}" = "pnacl" -o "${NACL_ARCH}" = "le32" ] ; then
58 NONXS_EXT="Errno" 59 NONXS_EXT="Errno"
59 fi 60 fi
60 61
61 EnableCliMain 62 EnableCliMain
62 EnableGlibcCompat 63 EnableGlibcCompat
63 64
64 # BuildHostMiniperl builds miniperl for host, which is needed for 65 # BuildHostMiniperl builds miniperl for host, which is needed for
65 # building Perl for the target 66 # building Perl for the target
66 BuildHostMiniperl() { 67 BuildHostMiniperl() {
67 if [ ! -x ${HOST_BUILD}/miniperl ]; then 68 if [ ! -x ${HOST_BUILD}/miniperl ]; then
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 MakeDir ${DESTDIR_BIN} 159 MakeDir ${DESTDIR_BIN}
159 LogExecute cp -f ${SRC_DIR}/{perl,microperl} ${DESTDIR_BIN}/ 160 LogExecute cp -f ${SRC_DIR}/{perl,microperl} ${DESTDIR_BIN}/
160 fi 161 fi
161 } 162 }
162 163
163 TestStep() { 164 TestStep() {
164 export NACL_SDK_ROOT 165 export NACL_SDK_ROOT
165 export TOOLCHAIN 166 export TOOLCHAIN
166 167
167 # skip for pnacl 168 # skip for pnacl
168 if [ "${NACL_ARCH}" = "pnacl" ] ; then 169 if [ "${NACL_ARCH}" = "pnacl" -o "${NACL_ARCH}" = "le32" ] ; then
169 return 170 return
170 fi 171 fi
171 172
172 # ignore error messages for now 173 # ignore error messages for now
173 echo "Running ${START_DIR}/tests.sh" 174 echo "Running ${START_DIR}/tests.sh"
174 ${START_DIR}/tests.sh 2>tests_err.txt 1>tests_out.txt 175 ${START_DIR}/tests.sh 2>tests_err.txt 1>tests_out.txt
175 EXPECTED=${START_DIR}/expected_${TOOLCHAIN}.txt 176 EXPECTED=${START_DIR}/expected_${TOOLCHAIN}.txt
176 if ! cmp tests_out.txt ${EXPECTED}; then 177 if ! cmp tests_out.txt ${EXPECTED}; then
177 echo "Test output did not match expected output" 178 echo "Test output did not match expected output"
178 echo "See ${PWD}/tests_err.txt" 179 echo "See ${PWD}/tests_err.txt"
179 diff -u tests_out.txt ${EXPECTED} 180 diff -u tests_out.txt ${EXPECTED}
180 exit 1 181 exit 1
181 fi 182 fi
182 183
183 echo "PASSED" 184 echo "PASSED"
184 } 185 }
OLDNEW
« make_all.sh ('K') | « ports/openjpeg/build.sh ('k') | ports/pkg/nacl.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698