[PATCH] D11618: [CMake] Pass -march=i686 when targeting i686 (PR24222)
Hans Wennborg
hans at chromium.org
Wed Jul 29 18:45:45 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL243604: [CMake] Pass -march=i686 when targeting i686 (PR24222) (authored by hans).
Changed prior to commit:
http://reviews.llvm.org/D11618?vs=30976&id=30978#toc
Repository:
rL LLVM
http://reviews.llvm.org/D11618
Files:
compiler-rt/trunk/cmake/config-ix.cmake
compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc
Index: compiler-rt/trunk/cmake/config-ix.cmake
===================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake
+++ compiler-rt/trunk/cmake/config-ix.cmake
@@ -180,7 +180,8 @@
# 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)
Index: compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc
===================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Linux/open_memstream.cc
+++ compiler-rt/trunk/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>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11618.30978.patch
Type: text/x-patch
Size: 1334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150730/c62fbe51/attachment.bin>
More information about the llvm-commits
mailing list