If libacc is built on x86, then x86 is the default code generator. If libacc is built on arm. then ARM is the default code generator And so on for future architectures. The 64-bit x64 machine has no working code generator currently. We may add one to support the simulator builds. Improved the test program so we don't try to run tests if the compile failed. Also avoid running tests that don't work on a given platform.
13 lines
419 B
Bash
Executable file
13 lines
419 B
Bash
Executable file
#!/bin/sh
|
|
rm -f tests/acc
|
|
g++ acc.cpp disassem.cpp -g -ldl -o tests/acc && tests/acc tests/otcc.c -a x86 -d tests/otcc.out && diff tests/otcc.out tests/otcc.out-orig
|
|
if [ -x "tests/acc" ]; then
|
|
tests/acc -S tests/returnval.c
|
|
|
|
if [ "$(uname)" = "Linux" ]; then
|
|
if [ "$(uname -m)" = "i686" ]; then
|
|
echo "Linux i686. Testing otcc.c"
|
|
tests/acc tests/otcc.c tests/otcc.c tests/returnval.c
|
|
fi
|
|
fi
|
|
fi
|