]> granicus.if.org Git - clang/commitdiff
Fix clash of gcc toolchains in driver regression tests
authorKarl-Johan Karlsson <karl-johan.karlsson@ericsson.com>
Tue, 7 Aug 2018 08:10:33 +0000 (08:10 +0000)
committerKarl-Johan Karlsson <karl-johan.karlsson@ericsson.com>
Tue, 7 Aug 2018 08:10:33 +0000 (08:10 +0000)
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

test/Driver/linux-header-search.cpp
test/Driver/linux-ld.c

index f545b439b4abbf68c485a810398139304cef261b..b4118f9c42fc9e1855ba35d78bb34d0fdecb0c66 100644 (file)
 // 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"
 // 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"
index 787013931a48a5c9e5fdeab7b98da9fc8685e00d..d9c96dd196141d346e2621c95da72b125c38988c 100644 (file)
 // 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
 
 // 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