OLD | NEW |
(Empty) | |
| 1 #!/bin/bash |
| 2 # Copyright 2012 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can |
| 4 # be found in the LICENSE file. |
| 5 |
| 6 set -eu |
| 7 |
| 8 # Get the path to the Mips cross-compiler. |
| 9 |
| 10 dir=$(pwd) |
| 11 cd ../../../.. |
| 12 topdir=$(pwd) |
| 13 tools="$topdir/toolchain/pnacl_linux_x86_64/pkg/binutils/mipsel-pc-nacl/bin" |
| 14 cd $dir |
| 15 |
| 16 readonly MIPSEL_LD="$tools/ld" |
| 17 readonly MIPSEL_AS="$tools/as" |
| 18 |
| 19 |
| 20 for test_file in *.S ; do |
| 21 object_file=${test_file%.*}.o |
| 22 mipsel_nexe_file=${test_file%.*}.nexe |
| 23 special_link_options="--section-start .text=0xFFFA000" |
| 24 |
| 25 echo "compiling (MIPS32) $test_file -> $mipsel_nexe_file" |
| 26 ${MIPSEL_AS} -mips32r2 -EL -mdsp\ |
| 27 $test_file -o $object_file |
| 28 if [ $test_file == "test_invalid_dest.S" ] |
| 29 then |
| 30 ${MIPSEL_LD} $special_link_options -static -nodefaultlibs -nostdlib \ |
| 31 -m elf32ltsmip_nacl $object_file -o $mipsel_nexe_file |
| 32 else |
| 33 ${MIPSEL_LD} -static -nodefaultlibs -nostdlib \ |
| 34 -m elf32ltsmip_nacl $object_file -o $mipsel_nexe_file |
| 35 fi |
| 36 rm $object_file |
| 37 done |
| 38 |
OLD | NEW |