compiler-rt: actually use arch_cFlags and disabling subft3 test on ARMv8
authorReto Achermann <reto.achermann@inf.ethz.ch>
Thu, 11 May 2017 13:01:00 +0000 (15:01 +0200)
committerReto Achermann <reto.achermann@inf.ethz.ch>
Thu, 11 May 2017 13:01:00 +0000 (15:01 +0200)
Signed-off-by: Reto Achermann <reto.achermann@inf.ethz.ch>

lib/compiler-rt/test/Hakefile
lib/compiler-rt/test/subtf3_test.c

index 617e816..68afba0 100644 (file)
@@ -186,11 +186,11 @@ let
     "-Wno-redundant-decls"
     ]
 
-  arch_cFlags arch = case arch of "x86_64"  -> [ ]
-                                  "k1om"    -> [ ]
-                                  "x86_32"  -> [ ]
-                                  "armv7"   -> [ "-D__ARM_EABI__" ]
-                                  "armv8"   -> [ ]
+  arch_cFlags arch = case arch of "x86_64"  -> common_cFlags
+                                  "k1om"    -> common_cFlags
+                                  "x86_32"  -> common_cFlags
+                                  "armv7"   -> common_cFlags ++ [ "-D__ARM_EABI__" ]
+                                  "armv8"   -> common_cFlags
 
   builtins_unittest_dir = "test/builtins/Unit/"
 
@@ -198,12 +198,15 @@ in [ build application {
         target = "compiler-rt/" ++ builtins_unittest_dir ++
                                    (take ((length f) - 2) f),
         cFiles = [ f ],
-        addCFlags = common_cFlags,
+        addCFlags = arch_cFlags arch,
         addLibraries = libDeps [
             "compiler-rt",
             "m"
         ],
+        architectures = [
+            arch
+        ],
         addIncludes = [
             "/lib/compiler-rt/builtins/"
         ]
-    } | f <- builtins_unittest_files ]
+    } | f <- builtins_unittest_files, arch <- allArchitectures ]
index ad115a4..ea518a8 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <stdio.h>
 
-#if __LDBL_MANT_DIG__ == 113
+#if __LDBL_MANT_DIG__ == 113 && !defined(__ARM_ARCH_8A__ )
 
 #include "fp_test.h"
 
@@ -40,7 +40,7 @@ char assumption_1[sizeof(long double) * CHAR_BIT == 128] = {0};
 
 int main()
 {
-#if __LDBL_MANT_DIG__ == 113
+#if __LDBL_MANT_DIG__ == 113 && !defined(__ARM_ARCH_8A__ )
     // qNaN - any = qNaN
     if (test__subtf3(makeQNaN128(),
                      0x1.23456789abcdefp+5L,