From: Karl-Johan Karlsson Date: Tue, 7 Aug 2018 08:10:33 +0000 (+0000) Subject: Fix clash of gcc toolchains in driver regression tests X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bd905309f7095d6ba1d40b65b8012b181988c013;p=clang Fix clash of gcc toolchains in driver regression tests For some regression tests the path to the right toolchain is specified using the -sysroot switch. However, if clang was configured with a custom gcc toolchain (either by using GCC_INSTALL_PREFIX in cmake or the equivalent configure command), the path to the custom gcc toolchain path takes precedence to the one specified by sysroot. This causes several regression tests to fail as they will be using an unexpected path. This patch fixes this issue by adding --gcc-toolchain='' to all tests that rely on that. The empty string causes the driver to pick the path from sysroot instead. This patch contain the same kind of fixes as done in rC225182 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339112 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/Driver/linux-header-search.cpp b/test/Driver/linux-header-search.cpp index f545b439b4..b4118f9c42 100644 --- a/test/Driver/linux-header-search.cpp +++ b/test/Driver/linux-header-search.cpp @@ -498,6 +498,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ // RUN: -target arm-oe-linux-gnueabi -stdlib=libstdc++ \ // RUN: --sysroot=%S/Inputs/openembedded_arm_linux_tree \ +// RUN: --gcc-toolchain="" \ // RUN: | FileCheck --check-prefix=CHECK-OE-ARM %s // CHECK-OE-ARM: "{{[^"]*}}clang{{[^"]*}}" "-cc1" @@ -509,6 +510,7 @@ // RUN: %clang -no-canonical-prefixes %s -### -fsyntax-only 2>&1 \ // RUN: -target aarch64-oe-linux -stdlib=libstdc++ \ // RUN: --sysroot=%S/Inputs/openembedded_aarch64_linux_tree \ +// RUN: --gcc-toolchain="" \ // RUN: | FileCheck --check-prefix=CHECK-OE-AARCH64 %s // CHECK-OE-AARCH64: "{{[^"]*}}clang{{[^"]*}}" "-cc1" diff --git a/test/Driver/linux-ld.c b/test/Driver/linux-ld.c index 787013931a..d9c96dd196 100644 --- a/test/Driver/linux-ld.c +++ b/test/Driver/linux-ld.c @@ -1817,6 +1817,7 @@ // Check whether the OpenEmbedded ARM libs are added correctly. // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=arm-oe-linux-gnueabi -rtlib=libgcc \ +// RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/openembedded_arm_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-OE-ARM %s @@ -1836,6 +1837,7 @@ // Check whether the OpenEmbedded AArch64 libs are added correctly. // RUN: %clang -no-canonical-prefixes %s -### -o %t.o 2>&1 \ // RUN: --target=aarch64-oe-linux -rtlib=libgcc \ +// RUN: --gcc-toolchain="" \ // RUN: --sysroot=%S/Inputs/openembedded_aarch64_linux_tree \ // RUN: | FileCheck --check-prefix=CHECK-OE-AARCH64 %s