OSDN Git Service

AArch64: Add fixes to bionic/tests
authorSerban Constantinescu <serban.constantinescu@arm.com>
Tue, 22 Oct 2013 10:30:12 +0000 (11:30 +0100)
committerElliott Hughes <enh@google.com>
Tue, 17 Dec 2013 01:40:30 +0000 (17:40 -0800)
This patch adds minor fixes to the bionic unit tests.

Change-Id: Ie10f33c631ed6c10987923d678711d22931ddb05
Signed-off-by: Serban Constantinescu <serban.constantinescu@arm.com>
benchmarks/Android.mk
benchmarks/benchmark_main.cpp
tests/Android.mk

index 83e490f..f64c108 100644 (file)
@@ -27,6 +27,7 @@ benchmark_c_flags = \
     -Wall -Wextra \
     -Werror \
     -fno-builtin \
+    -std=gnu++11 \
 
 benchmark_src_files = \
     benchmark_main.cpp \
index e15a688..d8b8e58 100644 (file)
@@ -23,6 +23,8 @@
 #include <string>
 #include <map>
 
+#include <inttypes.h>
+
 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<int64_t>(iterations), gBenchmarkTotalTimeNs/iterations, throughput);
+  printf("%-20s %10d %10" PRId64 "%s\n", full_name,
+         iterations, gBenchmarkTotalTimeNs/iterations, throughput);
   fflush(stdout);
 }
 
index b5398f1..d4d82ee 100644 (file)
@@ -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 \