r255328 - Driver: add multilibs for ARM EB

Saleem Abdulrasool via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 10 22:21:00 PST 2015


Author: compnerd
Date: Fri Dec 11 00:20:59 2015
New Revision: 255328

URL: http://llvm.org/viewvc/llvm-project?rev=255328&view=rev
Log:
Driver: add multilibs for ARM EB

This improves the coverage for the multilib directories used for ARM.  Also add
tests covering the internal triple (thumbv7-*).  The Juno board can be run in
this configuration.

Added:
    cfe/trunk/test/Driver/Inputs/multilib_arm_linux_tree/
    cfe/trunk/test/Driver/Inputs/multilib_arm_linux_tree/usr/
    cfe/trunk/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/
    cfe/trunk/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/arm-linux-gnueabi/
    cfe/trunk/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/arm-linux-gnueabi/.keep
    cfe/trunk/test/Driver/Inputs/multilib_armeb_linux_tree/
    cfe/trunk/test/Driver/Inputs/multilib_armeb_linux_tree/usr/
    cfe/trunk/test/Driver/Inputs/multilib_armeb_linux_tree/usr/include/
    cfe/trunk/test/Driver/Inputs/multilib_armeb_linux_tree/usr/include/armeb-linux-gnueabi/
    cfe/trunk/test/Driver/Inputs/multilib_armeb_linux_tree/usr/include/armeb-linux-gnueabi/.keep
    cfe/trunk/test/Driver/Inputs/multilib_armebhf_linux_tree/
    cfe/trunk/test/Driver/Inputs/multilib_armebhf_linux_tree/usr/
    cfe/trunk/test/Driver/Inputs/multilib_armebhf_linux_tree/usr/include/
    cfe/trunk/test/Driver/Inputs/multilib_armebhf_linux_tree/usr/include/armeb-linux-gnueabihf/
    cfe/trunk/test/Driver/Inputs/multilib_armebhf_linux_tree/usr/include/armeb-linux-gnueabihf/.keep
    cfe/trunk/test/Driver/Inputs/multilib_armhf_linux_tree/
    cfe/trunk/test/Driver/Inputs/multilib_armhf_linux_tree/usr/
    cfe/trunk/test/Driver/Inputs/multilib_armhf_linux_tree/usr/include/
    cfe/trunk/test/Driver/Inputs/multilib_armhf_linux_tree/usr/include/arm-linux-gnueabihf/
    cfe/trunk/test/Driver/Inputs/multilib_armhf_linux_tree/usr/include/arm-linux-gnueabihf/.keep
    cfe/trunk/test/Driver/arm-multilibs.c
Modified:
    cfe/trunk/lib/Driver/ToolChains.cpp

Modified: cfe/trunk/lib/Driver/ToolChains.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains.cpp?rev=255328&r1=255327&r2=255328&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains.cpp Fri Dec 11 00:20:59 2015
@@ -3954,6 +3954,10 @@ void Linux::AddClangSystemIncludeArgs(co
       "/usr/include/arm-linux-gnueabi"};
   const StringRef ARMHFMultiarchIncludeDirs[] = {
       "/usr/include/arm-linux-gnueabihf"};
+  const StringRef ARMEBMultiarchIncludeDirs[] = {
+      "/usr/include/armeb-linux-gnueabi"};
+  const StringRef ARMEBHFMultiarchIncludeDirs[] = {
+      "/usr/include/armeb-linux-gnueabihf"};
   const StringRef MIPSMultiarchIncludeDirs[] = {"/usr/include/mips-linux-gnu"};
   const StringRef MIPSELMultiarchIncludeDirs[] = {
       "/usr/include/mipsel-linux-gnu"};
@@ -3987,11 +3991,19 @@ void Linux::AddClangSystemIncludeArgs(co
     MultiarchIncludeDirs = AArch64MultiarchIncludeDirs;
     break;
   case llvm::Triple::arm:
+  case llvm::Triple::thumb:
     if (getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
       MultiarchIncludeDirs = ARMHFMultiarchIncludeDirs;
     else
       MultiarchIncludeDirs = ARMMultiarchIncludeDirs;
     break;
+  case llvm::Triple::armeb:
+  case llvm::Triple::thumbeb:
+    if (getTriple().getEnvironment() == llvm::Triple::GNUEABIHF)
+      MultiarchIncludeDirs = ARMEBHFMultiarchIncludeDirs;
+    else
+      MultiarchIncludeDirs = ARMEBMultiarchIncludeDirs;
+    break;
   case llvm::Triple::mips:
     MultiarchIncludeDirs = MIPSMultiarchIncludeDirs;
     break;

Added: cfe/trunk/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/arm-linux-gnueabi/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/multilib_arm_linux_tree/usr/include/arm-linux-gnueabi/.keep?rev=255328&view=auto
==============================================================================
    (empty)

Added: cfe/trunk/test/Driver/Inputs/multilib_armeb_linux_tree/usr/include/armeb-linux-gnueabi/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/multilib_armeb_linux_tree/usr/include/armeb-linux-gnueabi/.keep?rev=255328&view=auto
==============================================================================
    (empty)

Added: cfe/trunk/test/Driver/Inputs/multilib_armebhf_linux_tree/usr/include/armeb-linux-gnueabihf/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/multilib_armebhf_linux_tree/usr/include/armeb-linux-gnueabihf/.keep?rev=255328&view=auto
==============================================================================
    (empty)

Added: cfe/trunk/test/Driver/Inputs/multilib_armhf_linux_tree/usr/include/arm-linux-gnueabihf/.keep
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/Inputs/multilib_armhf_linux_tree/usr/include/arm-linux-gnueabihf/.keep?rev=255328&view=auto
==============================================================================
    (empty)

Added: cfe/trunk/test/Driver/arm-multilibs.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/arm-multilibs.c?rev=255328&view=auto
==============================================================================
--- cfe/trunk/test/Driver/arm-multilibs.c (added)
+++ cfe/trunk/test/Driver/arm-multilibs.c Fri Dec 11 00:20:59 2015
@@ -0,0 +1,17 @@
+// RUN: %clang -target armv7-linux-gnueabi --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ARM %s
+// RUN: %clang -target thumbv7-linux-gnueabi --sysroot=%S/Inputs/multilib_arm_linux_tree -### -c %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ARM %s
+
+// RUN: %clang -target armv7-linux-gnueabihf --sysroot=%S/Inputs/multilib_armhf_linux_tree -### -c %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ARMHF %s
+// RUN: %clang -target thumbv7-linux-gnueabihf --sysroot=%S/Inputs/multilib_armhf_linux_tree -### -c %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ARMHF %s
+
+// RUN: %clang -target armv7eb-linux-gnueabi --sysroot=%S/Inputs/multilib_armeb_linux_tree -### -c %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ARMEB %s
+// RUN: %clang -target thumbv7eb-linux-gnueabi --sysroot=%S/Inputs/multilib_armeb_linux_tree -### -c %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ARMEB %s
+
+// RUN: %clang -target armv7eb-linux-gnueabihf --sysroot=%S/Inputs/multilib_armebhf_linux_tree -### -c %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ARMEBHF %s
+// RUN: %clang -target thumbv7eb-linux-gnueabihf --sysroot=%S/Inputs/multilib_armebhf_linux_tree -### -c %s -o /dev/null 2>&1 | FileCheck -check-prefix CHECK-ARMEBHF %s
+
+// CHECK-ARM: "-internal-externc-isystem" "{{.*}}/usr/include/arm-linux-gnueabi"
+// CHECK-ARMHF: "-internal-externc-isystem" "{{.*}}/usr/include/arm-linux-gnueabihf"
+// CHECK-ARMEB: "-internal-externc-isystem" "{{.*}}/usr/include/armeb-linux-gnueabi"
+// CHECK-ARMEBHF: "-internal-externc-isystem" "{{.*}}/usr/include/armeb-linux-gnueabihf"
+




More information about the cfe-commits mailing list