Chromium Code Reviews| 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 # Copyright 2012 MIPS Technologies / RT-RK | |
|
Brad Chen
2012/04/13 00:50:52
I don't think this MIPS copyright should be here.
| |
| 6 | |
| 7 set -eu | |
| 8 | |
| 9 # Get the path to the Mips cross-compiler. | |
| 10 | |
| 11 dir=$(pwd) | |
| 12 cd ../../../.. | |
| 13 topdir=$(pwd) | |
| 14 tools="$topdir/toolchain/pnacl_linux_x86_64/pkg/binutils/mipsel-pc-nacl/bin" | |
| 15 cd $dir | |
| 16 | |
| 17 readonly MIPSEL_LD="$tools/ld" | |
| 18 readonly MIPSEL_AS="$tools/as" | |
| 19 | |
| 20 | |
| 21 for test_file in *.S ; do | |
| 22 object_file=${test_file%.*}.o | |
| 23 mipsel_nexe_file=${test_file%.*}.nexe | |
| 24 special_link_options="--section-start .text=0xFFFA000" | |
| 25 | |
| 26 echo "compiling (MIPS32) $test_file -> $mipsel_nexe_file" | |
| 27 ${MIPSEL_AS} -mips32r2 -EL -mdsp\ | |
| 28 $test_file -o $object_file | |
| 29 if [ $test_file == "test_invalid_dest.S" ] | |
| 30 then | |
| 31 ${MIPSEL_LD} $special_link_options -static -nodefaultlibs -nostdlib \ | |
| 32 -m elf32ltsmip_nacl $object_file -o $mipsel_nexe_file | |
| 33 else | |
| 34 ${MIPSEL_LD} -static -nodefaultlibs -nostdlib \ | |
| 35 -m elf32ltsmip_nacl $object_file -o $mipsel_nexe_file | |
| 36 fi | |
| 37 rm $object_file | |
| 38 done | |
| 39 | |
| OLD | NEW |