diff --git a/clang/test/Driver/Inputs/rhel_7_tree/opt/rh/devtoolset-7/root/usr/bin/ld b/clang/test/Driver/Inputs/rhel_7_tree/opt/rh/devtoolset-7/root/usr/bin/ld new file mode 100755 diff --git a/clang/test/Driver/Inputs/rhel_7_tree/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/crtbegin.o b/clang/test/Driver/Inputs/rhel_7_tree/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/crtbegin.o new file mode 100644 diff --git a/clang/test/Driver/Inputs/rhel_7_tree/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/crtend.o b/clang/test/Driver/Inputs/rhel_7_tree/opt/rh/devtoolset-7/root/usr/lib/gcc/x86_64-redhat-linux/7/crtend.o new file mode 100644 diff --git a/clang/test/Driver/linux-ld.c b/clang/test/Driver/linux-ld.c --- a/clang/test/Driver/linux-ld.c +++ b/clang/test/Driver/linux-ld.c @@ -1794,12 +1794,11 @@ // RUN: %clang -### %s -no-pie 2>&1 \ // RUN: --target=x86_64-unknown-linux-gnu \ // RUN: --gcc-toolchain="%S/Inputs/rhel_7_tree/opt/rh/devtoolset-7/root/usr" \ -// RUN: --sysroot=%S/Inputs/rhel_7_tree \ +// RUN: --sysroot="%S/Inputs/rhel_7_tree/opt/rh/devtoolset-7/root" \ // RUN: | FileCheck --check-prefix=CHECK-LD-RHEL7-DTS %s -// CHECK-LD-RHEL7-DTS: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" -// CHECK-LD-RHLE7-DTS: Selected GCC installation: [[GCC_INSTALL:[[SYSROOT]]/lib/gcc/x86_64-redhat-linux/7]] +// CHECK-LD-RHEL7-DTS: "-isysroot" "[[SYSROOT:[^"]+]]" // CHECK-LD-RHEL7-DTS-NOT: /usr/bin/ld -// CHECK-LD-RHLE7-DTS: [[GCC_INSTALL]/../../../bin/ld +// CHECK-LD-RHEL7-DTS: [[SYSROOT]]/usr/lib/gcc/x86_64-redhat-linux/7/../../../../bin/ld // Check whether gcc7 install works fine on Amazon Linux AMI // RUN: %clang -### %s -no-pie 2>&1 \