| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright 2009 The Native Client Authors. All rights reserved. | 2 # Copyright 2009 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
| 4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
| 5 # Copyright 2009 Google Inc. | 5 # Copyright 2009 Google Inc. |
| 6 | 6 |
| 7 set -eu | 7 set -eu |
| 8 | 8 |
| 9 # Get the path to the ARM cross-compiler. | 9 # Get the path to the ARM cross-compiler. |
| 10 # We use the trusted compiler because llvm-fake.py (used in the | 10 # We use the trusted compiler because llvm-fake.py (used in the |
| 11 # untrusted compiler) doesn't support -nodefaultlibs. | 11 # untrusted compiler) doesn't support -nodefaultlibs. |
| 12 dir=$(pwd) | 12 dir=$(pwd) |
| 13 cd ../../../.. | 13 cd ../../../.. |
| 14 source tools/llvm/setup_arm_trusted_toolchain.sh | 14 source tools/llvm/setup_arm_trusted_toolchain.sh |
| 15 topdir=$(pwd) | 15 topdir=$(pwd) |
| 16 cd $dir | 16 cd $dir |
| 17 | 17 |
| 18 ldscript=$topdir/toolchain/linux_arm-untrusted/arm-none-linux-gnueabi/ld_script_
arm_untrusted | 18 ldscript=$topdir/toolchain/pnacl_linux_x86_64/ldscripts/ld_script_arm_untrusted |
| 19 | 19 |
| 20 readonly ARM_CROSS_COMPILER="${ARM_CC}" | 20 readonly ARM_CROSS_COMPILER="${ARM_CC}" |
| 21 for test_file in *.S ; do | 21 for test_file in *.S ; do |
| 22 object_file=${test_file%.*}.o | 22 object_file=${test_file%.*}.o |
| 23 nexe_file=${test_file%.*}.nexe | 23 nexe_file=${test_file%.*}.nexe |
| 24 | 24 |
| 25 echo "compiling $test_file -> $nexe_file" | 25 echo "compiling $test_file -> $nexe_file" |
| 26 ${ARM_CROSS_COMPILER} \ | 26 ${ARM_CROSS_COMPILER} \ |
| 27 -march=armv7-a -mcpu=cortex-a8 -mfpu=neon -c $test_file -o $object_file | 27 -march=armv7-a -mcpu=cortex-a8 -mfpu=neon -c $test_file -o $object_file |
| 28 ${ARM_LD} -static -nodefaultlibs -nostdlib -T $ldscript \ | 28 ${ARM_LD} -static -nodefaultlibs -nostdlib -T $ldscript \ |
| 29 $object_file -o $nexe_file | 29 $object_file -o $nexe_file |
| 30 done | 30 done |
| OLD | NEW |