Guess N32 ABI when no abi option is given based on llvm patch.
It now support mips64(el)-linux-gnuabin32 and mipsn32(el).
The include and library paths are also added based on
Debian/Gcc scheme.
| Paths 
 |  Differential  D51464  
clang: fix MIPS/N32 triple and paths ClosedPublic Authored by wzssyqa on Aug 29 2018, 3:56 PM. 
Details Summary Guess N32 ABI when no abi option is given based on llvm patch. The include and library paths are also added based on 
Diff Detail Event TimelineHerald added subscribers: cfe-commits, jrtc27, arichardson and 2 others.  ·  View Herald TranscriptAug 29 2018, 3:56 PM Comment Actions Could you please include more context to patches sent for review? 
 Comment Actions This patch fails the following test cases: 
 
 This revision now requires changes to proceed.Sep 20 2018, 4:39 AM 
 Comment Actions Please run test suite before sending a patch to review. After applying this patch the following tests failed: 
 Comment Actions ohhh. make check-all is needed, instead of make check 
 is due to duplicate line `MIPS-64EL: target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128"' 
 is due to this test use the hardcode path `/mips-linux-gnu/', so mipsel and mips64el also need
    BiarchTripleAliases.append(begin(MIPSTriples), end(MIPSTriples));
although MIPSTriples should in the last order.
 Comment Actions I'm going to test current MIPS N32 ABI implementation. Maybe we are ready to enable integrated assembler for it. In that case both Generic_GCC::IsIntegratedAssemblerDefault() and MipsMCAsmInfo ctor can be simplified. This revision is now accepted and ready to land.Oct 15 2018, 3:44 PM Closed by commit rC344570: [mips] Fix handling of GNUABIN32 environment in a target triple (authored by atanasyan).  ·  Explain WhyOct 15 2018, 3:45 PM This revision was automatically updated to reflect the committed changes. 
Revision Contents 
 
Diff 168116 lib/Basic/Targets/Mips.h
 lib/Driver/ToolChains/Arch/Mips.cpp
 lib/Driver/ToolChains/Gnu.cpp
 lib/Driver/ToolChains/Linux.cpp
 test/CodeGen/atomics-inlining.c
 test/CodeGen/mips-zero-sized-struct.c
 test/CodeGen/target-data.c
 test/CodeGen/xray-attributes-supported.cpp
 test/Driver/clang-translation.c
 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Let's write all cases in a uniform manner:
if (Triple.isMIPS32()) setABI("o32"); else if (Triple.getEnvironment() == llvm::Triple::GNUABIN32) setABI("n32"); else setABI("n64");