ref: a8f943890e938e9bb91a854be561f10822b807b3
parent: f3de211d911e8cdd0ed105efb74b70d54628af13
author: lieff <lieff@users.noreply.github.com>
date: Sat Feb 17 14:55:39 EST 2018
add powerpc testing
--- a/.travis.yml
+++ b/.travis.yml
@@ -7,9 +7,17 @@
- libnewlib-arm-none-eabi
- gcc-4.8-multilib
- gcc-4.8-aarch64-linux-gnu
+ - gcc-4.8-powerpc-linux-gnu
+ - gcc-4.8-powerpc64-linux-gnu
- gcc-aarch64-linux-gnu
+ - gcc-powerpc-linux-gnu
+ - gcc-powerpc64-linux-gnu
- libc6-arm64-cross
+ - libc6-powerpc-cross
+ - libc6-ppc64-cross
- libc6-dev-arm64-cross
+ - libc6-dev-powerpc-cross
+ - libc6-dev-ppc64-cross
- qemu
os:
--- a/minimp3_test.c
+++ b/minimp3_test.c
@@ -123,7 +123,7 @@
}
#else
-#if defined(__arm__) || defined(__aarch64__)
+#if defined(__arm__) || defined(__aarch64__) || defined(__PPC__)
int main2(int argc, char *argv[]);
int main2(int argc, char *argv[])
#else
@@ -179,7 +179,7 @@
return 0;
}
-#if defined(__arm__) || defined(__aarch64__)
+#if defined(__arm__) || defined(__aarch64__) || defined(__PPC__)
static const char *g_files[] = {
"vectors/ILL2_center2.bit",
"vectors/ILL2_dual.bit",
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -6,6 +6,7 @@
set -e
+echo testing coverage x86 w sse...
gcc -coverage -O0 -m32 -std=c89 -msse2 -DMINIMP3_TEST -DMINIMP3_NO_WAV -o minimp3 minimp3_test.c -lm
scripts/test.sh
set +e
@@ -14,28 +15,45 @@
set -e
gcov minimp3_test.c
+echo testing x86 w/o sse...
gcc -O2 -m32 -std=c89 -Wall -Wextra -Wmissing-prototypes -Werror -fno-asynchronous-unwind-tables -fno-stack-protector \
-ffunction-sections -fdata-sections -Wl,--gc-sections -o minimp3 minimp3_test.c -lm
scripts/test.sh
+echo testing x64...
gcc -O2 -std=c89 -Wall -Wextra -Wmissing-prototypes -Werror -fno-asynchronous-unwind-tables -fno-stack-protector \
-ffunction-sections -fdata-sections -Wl,--gc-sections -o minimp3 minimp3_test.c -lm
scripts/test.sh
+echo testing arm w/o neon...
arm-none-eabi-gcc -O2 -std=c89 -Wall -Wextra -Wmissing-prototypes -Werror -fno-asynchronous-unwind-tables -fno-stack-protector \
-mthumb -mcpu=cortex-m4 \
-ffunction-sections -fdata-sections -Wl,--gc-sections -o minimp3_arm minimp3_test.c --specs=rdimon.specs -lm
qemu-arm ./minimp3_arm
+echo testing arm w neon...
arm-none-eabi-gcc -O2 -std=c89 -Wall -Wextra -Wmissing-prototypes -Werror -fno-asynchronous-unwind-tables -fno-stack-protector \
-marm -mcpu=cortex-a15 -mfpu=neon -mfloat-abi=softfp \
-ffunction-sections -fdata-sections -Wl,--gc-sections -o minimp3_arm minimp3_test.c --specs=rdimon.specs -lm
qemu-arm ./minimp3_arm
+echo testing arm64...
aarch64-linux-gnu-gcc -O2 -std=c89 -Wall -Wextra -Wmissing-prototypes -Werror -fno-asynchronous-unwind-tables -fno-stack-protector \
-static -march=armv8-a \
-ffunction-sections -fdata-sections -Wl,--gc-sections -o minimp3_arm minimp3_test.c -lm
qemu-aarch64 ./minimp3_arm
+
+echo testing powerpc...
+powerpc-linux-gnu-gcc -O2 -std=c89 -Wall -Wextra -Wmissing-prototypes -Werror -fno-asynchronous-unwind-tables -fno-stack-protector \
+-static \
+-ffunction-sections -fdata-sections -Wl,--gc-sections -o minimp3_ppc minimp3_test.c -lm
+qemu-ppc ./minimp3_ppc
+
+echo testing powerpc64...
+powerpc64-linux-gnu-gcc -O2 -std=c89 -Wall -Wextra -Wmissing-prototypes -Werror -fno-asynchronous-unwind-tables -fno-stack-protector \
+-static \
+-ffunction-sections -fdata-sections -Wl,--gc-sections -o minimp3_ppc minimp3_test.c -lm
+qemu-ppc64 ./minimp3_ppc
if [ ! "$TRAVIS" = "true" ]; then
rm emmintrin.h.gcov minimp3_arm minimp3_test.gcda minimp3_test.gcno minimp3_test.c.gcov xmmintrin.h.gcov