Author: karka Date: Tue Aug 7 01:10:33 2018 New Revision: 339112 URL: http://llvm.org/viewvc/llvm-project?rev=339112&view=rev Log: 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 Modified: cfe/trunk/test/Driver/linux-header-search.cpp cfe/trunk/test/Driver/linux-ld.c Modified: cfe/trunk/test/Driver/linux-header-search.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/linux-header-search.cpp?rev=339112&r1=339111&r2=339112&view=diff ============================================================================== --- cfe/trunk/test/Driver/linux-header-search.cpp (original) +++ cfe/trunk/test/Driver/linux-header-search.cpp Tue Aug 7 01:10:33 2018 @@ -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" Modified: cfe/trunk/test/Driver/linux-ld.c URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/linux-ld.c?rev=339112&r1=339111&r2=339112&view=diff ============================================================================== --- cfe/trunk/test/Driver/linux-ld.c (original) +++ cfe/trunk/test/Driver/linux-ld.c Tue Aug 7 01:10:33 2018 @@ -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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits