[compiler-rt] r343182 - [compiler-rt][cmake][mips] Use -mabi option to select target architecture

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 27 00:17:00 PDT 2018


Author: atanasyan
Date: Thu Sep 27 00:17:00 2018
New Revision: 343182

URL: http://llvm.org/viewvc/llvm-project?rev=343182&view=rev
Log:
[compiler-rt][cmake][mips] Use -mabi option to select target architecture

The `--target` option is rejected by GCC starting from version 7.0.
It's shorter and more portable to use `mabi` option to select MIPS ABI
for testing target architecture. Clang supports that starting from r343169.

Modified:
    compiler-rt/trunk/cmake/base-config-ix.cmake

Modified: compiler-rt/trunk/cmake/base-config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/base-config-ix.cmake?rev=343182&r1=343181&r2=343182&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/base-config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/base-config-ix.cmake Thu Sep 27 00:17:00 2018
@@ -191,11 +191,11 @@ macro(test_targets)
       # clang's default CPU's. In the 64-bit case, we must also specify the ABI
       # since the default ABI differs between gcc and clang.
       # FIXME: Ideally, we would build the N32 library too.
-      test_target_arch(mipsel "" "-mips32r2" "--target=mipsel-linux-gnu")
-      test_target_arch(mips64el "" "-mips64r2" "--target=mips64el-linux-gnu" "-mabi=64")
+      test_target_arch(mipsel "" "-mips32r2" "-mabi=32")
+      test_target_arch(mips64el "" "-mips64r2" "-mabi=64")
     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "mips")
-      test_target_arch(mips "" "-mips32r2" "--target=mips-linux-gnu")
-      test_target_arch(mips64 "" "-mips64r2" "--target=mips64-linux-gnu" "-mabi=64")
+      test_target_arch(mips "" "-mips32r2" "-mabi=32")
+      test_target_arch(mips64 "" "-mips64r2" "-mabi=64")
     elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "arm")
       if(WIN32)
         test_target_arch(arm "" "" "")




More information about the llvm-commits mailing list