summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/config-ix.cmake3
-rw-r--r--test/sanitizer_common/TestCases/Linux/open_memstream.cc4
2 files changed, 4 insertions, 3 deletions
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index c645be4d8..a61b6dd18 100644
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -179,7 +179,8 @@ else()
# FIXME: We build runtimes for both i686 and i386, as "clang -m32" may
# target different variant than "$CMAKE_C_COMPILER -m32". This part should
# be gone after we resolve PR14109.
- test_target_arch(i686 __i686__ "-m32")
+ # Use -march to make sure Clang defines __i686__; see PR24222.
+ test_target_arch(i686 __i686__ "-m32" "-march=i686")
test_target_arch(i386 __i386__ "-m32")
else()
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
diff --git a/test/sanitizer_common/TestCases/Linux/open_memstream.cc b/test/sanitizer_common/TestCases/Linux/open_memstream.cc
index 69097c094..8f725c322 100644
--- a/test/sanitizer_common/TestCases/Linux/open_memstream.cc
+++ b/test/sanitizer_common/TestCases/Linux/open_memstream.cc
@@ -1,5 +1,5 @@
-// RUN: %clangxx -m64 -O0 -g -xc++ %s -o %t && %run %t
-// RUN: %clangxx -m64 -O3 -g -xc++ %s -o %t && %run %t
+// RUN: %clangxx -m64 -march=x86-64 -O0 -g -xc++ %s -o %t && %run %t
+// RUN: %clangxx -m64 -march=x86-64 -O3 -g -xc++ %s -o %t && %run %t
// REQUIRES: x86_64-supported-target
#include <assert.h>