From: Serban Constantinescu Date: Tue, 22 Oct 2013 10:30:12 +0000 (+0100) Subject: AArch64: Add fixes to bionic/tests X-Git-Tag: android-x86-7.1-r1~757^2~1513^2 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=282e232e2a32cca8a288e81edddfd95f450cfc79;p=android-x86%2Fbionic.git AArch64: Add fixes to bionic/tests This patch adds minor fixes to the bionic unit tests. Change-Id: Ie10f33c631ed6c10987923d678711d22931ddb05 Signed-off-by: Serban Constantinescu --- diff --git a/benchmarks/Android.mk b/benchmarks/Android.mk index 83e490f56..f64c108f5 100644 --- a/benchmarks/Android.mk +++ b/benchmarks/Android.mk @@ -27,6 +27,7 @@ benchmark_c_flags = \ -Wall -Wextra \ -Werror \ -fno-builtin \ + -std=gnu++11 \ benchmark_src_files = \ benchmark_main.cpp \ diff --git a/benchmarks/benchmark_main.cpp b/benchmarks/benchmark_main.cpp index e15a68831..d8b8e58eb 100644 --- a/benchmarks/benchmark_main.cpp +++ b/benchmarks/benchmark_main.cpp @@ -23,6 +23,8 @@ #include #include +#include + static int64_t gBytesProcessed; static int64_t gBenchmarkTotalTimeNs; static int64_t gBenchmarkStartTimeNs; @@ -162,8 +164,8 @@ void Benchmark::RunWithArg(int arg) { snprintf(full_name, sizeof(full_name), "%s", name_); } - printf("%-20s %10lld %10lld%s\n", full_name, - static_cast(iterations), gBenchmarkTotalTimeNs/iterations, throughput); + printf("%-20s %10d %10" PRId64 "%s\n", full_name, + iterations, gBenchmarkTotalTimeNs/iterations, throughput); fflush(stdout); } diff --git a/tests/Android.mk b/tests/Android.mk index b5398f152..d4d82ee8f 100644 --- a/tests/Android.mk +++ b/tests/Android.mk @@ -29,6 +29,14 @@ test_c_flags = \ -Werror \ -fno-builtin \ +ifeq ($(TARGET_ARCH),aarch64) + $(info TODO: $(LOCAL_PATH)/Android.mk -fstack-protector not yet available for the AArch64 toolchain) + test_c_flags += -fno-stack-protector + + $(info TODO: $(LOCAL_PATH)/Android.mk aarch64 GCC sees things other GCCs do not; punt for now) + test_c_flags += -Wno-error=strict-aliasing +endif # aarch64 + test_src_files = \ buffer_tests.cpp \ dirent_test.cpp \