Index: src/trusted/validator_arm/testdata/compile_tests.sh |
diff --git a/src/trusted/validator_arm/testdata/compile_tests.sh b/src/trusted/validator_arm/testdata/compile_tests.sh |
index 5891068044ef8495af3f3e5bdcb49b9e7797eda8..f07783e0b1e985aaab839a80efbdfdef1eae4caa 100755 |
--- a/src/trusted/validator_arm/testdata/compile_tests.sh |
+++ b/src/trusted/validator_arm/testdata/compile_tests.sh |
@@ -6,24 +6,23 @@ |
set -eu |
# Get the path to the ARM cross-compiler. |
-# We use the trusted compiler because llvm-fake.py (used in the |
-# untrusted compiler) doesn't support -nodefaultlibs. |
dir=$(pwd) |
cd ../../../.. |
-eval "$(tools/llvm/setup_arm_trusted_toolchain.py)" |
topdir=$(pwd) |
cd $dir |
-ldscript=$topdir/toolchain/pnacl_linux_x86_64/ldscripts/ld_script_arm_untrusted |
+tools="$topdir/toolchain/pnacl_linux_x86_64/arm-none-linux-gnueabi/bin" |
-readonly ARM_CROSS_COMPILER="${ARM_CC}" |
+ldscript=$topdir/toolchain/pnacl_linux_x86_64/ldscripts/ld_script_arm_untrusted |
+readonly ARM_LD="$tools/arm-pc-nacl-ld" |
+readonly ARM_AS="$tools/arm-pc-nacl-as" |
for test_file in *.S ; do |
object_file=${test_file%.*}.o |
nexe_file=${test_file%.*}.nexe |
- |
+ pre_file=${test_file%.*}.s |
echo "compiling $test_file -> $nexe_file" |
- ${ARM_CROSS_COMPILER} \ |
- -march=armv7-a -mcpu=cortex-a8 -mfpu=neon -c $test_file -o $object_file |
+ cpp $test_file -o $pre_file |
+ ${ARM_AS} -march=armv7-a -mcpu=cortex-a8 -mfpu=neon $pre_file -o $object_file |
${ARM_LD} -static -nodefaultlibs -nostdlib -T $ldscript \ |
$object_file -o $nexe_file |
done |