diff --git a/clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbegin.o b/clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o similarity index 100% rename from clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbegin.o rename to clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o diff --git a/clang/test/Driver/Inputs/basic_hurd_tree/usr/include/c++/4.6.0/.keep b/clang/test/Driver/Inputs/basic_hurd_tree/usr/include/c++/10/.keep similarity index 100% rename from clang/test/Driver/Inputs/basic_hurd_tree/usr/include/c++/4.6.0/.keep rename to clang/test/Driver/Inputs/basic_hurd_tree/usr/include/c++/10/.keep diff --git a/clang/test/Driver/Inputs/basic_hurd_tree/usr/include/i386-gnu/c++/4.6.0/.keep b/clang/test/Driver/Inputs/basic_hurd_tree/usr/include/i386-gnu/c++/10/.keep similarity index 100% rename from clang/test/Driver/Inputs/basic_hurd_tree/usr/include/i386-gnu/c++/4.6.0/.keep rename to clang/test/Driver/Inputs/basic_hurd_tree/usr/include/i386-gnu/c++/10/.keep diff --git a/clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbegin.o b/clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o similarity index 100% rename from clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbegin.o rename to clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o diff --git a/clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbeginS.o b/clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbeginS.o similarity index 100% rename from clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbeginS.o rename to clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbeginS.o diff --git a/clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbeginT.o b/clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbeginT.o similarity index 100% rename from clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbeginT.o rename to clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbeginT.o diff --git a/clang/test/Driver/hurd.cpp b/clang/test/Driver/hurd.cpp index cc6da07dc930..1c4ba16af063 100644 --- a/clang/test/Driver/hurd.cpp +++ b/clang/test/Driver/hurd.cpp @@ -1,27 +1,25 @@ // UNSUPPORTED: system-windows -// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \ -// RUN: --target=i686-pc-hurd-gnu \ -// RUN: --sysroot=%S/Inputs/basic_hurd_tree \ -// RUN: | FileCheck --check-prefix=CHECK %s +// RUN: %clang -### %s --target=i686-pc-hurd-gnu --sysroot=%S/Inputs/basic_hurd_tree \ +// RUN: --stdlib=platform 2>&1 | FileCheck --check-prefix=CHECK %s // CHECK: "-cc1" // CHECK: "-isysroot" "[[SYSROOT:[^"]+]]" -// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/c++/4.6.0" +// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/c++/10" /// Debian specific - the path component after 'include' is i386-gnu even /// though the installation is i686-gnu. -// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/i386-gnu/c++/4.6.0" -// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/c++/4.6.0/backward" +// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/i386-gnu/c++/10" +// CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/c++/10/backward" // CHECK-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/local/include" -// CHECK: "-internal-externc-isystem" +// CHECK: "-internal-externc-isystem" // CHECK-SAME: {{^}} "[[SYSROOT]]/usr/include/i386-gnu" // CHECK-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/include" // CHECK-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/usr/include" -// CHECK: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" -// CHECK: "-dynamic-linker" "/lib/ld.so" -// CHECK: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbegin.o" -// CHECK: "-L -// CHECK-SAME: {{^}}[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0" -// CHECK-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../lib32" +// CHECK: "{{.*}}ld" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK: "-dynamic-linker" "/lib/ld.so" +// CHECK: "{{.*}}/usr/lib/gcc/i686-gnu/10/crtbegin.o" +// CHECK: "-L +// CHECK-SAME: {{^}}[[SYSROOT]]/usr/lib/gcc/i686-gnu/10" +// CHECK-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../lib32" // CHECK-SAME: {{^}} "-L[[SYSROOT]]/lib/i386-gnu" // CHECK-SAME: {{^}} "-L[[SYSROOT]]/lib/../lib32" // CHECK-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/i386-gnu" @@ -29,29 +27,27 @@ // CHECK-SAME: {{^}} "-L[[SYSROOT]]/lib" // CHECK-SAME: {{^}} "-L[[SYSROOT]]/usr/lib" -// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \ -// RUN: --target=i686-pc-hurd-gnu -static \ -// RUN: --sysroot=%S/Inputs/basic_hurd_tree \ -// RUN: | FileCheck --check-prefix=CHECK-STATIC %s +// RUN: %clang -### %s --target=i686-pc-hurd-gnu --sysroot=%S/Inputs/basic_hurd_tree \ +// RUN: --stdlib=platform -static 2>&1 | FileCheck --check-prefix=CHECK-STATIC %s // CHECK-STATIC: "-cc1" // CHECK-STATIC: "-static-define" // CHECK-STATIC: "-isysroot" "[[SYSROOT:[^"]+]]" -// CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/c++/4.6.0" +// CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/c++/10" /// Debian specific - the path component after 'include' is i386-gnu even /// though the installation is i686-gnu. -// CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/i386-gnu/c++/4.6.0" -// CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/c++/4.6.0/backward" +// CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/i386-gnu/c++/10" +// CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../include/c++/10/backward" // CHECK-STATIC-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/local/include" -// CHECK-STATIC: "-internal-externc-isystem" +// CHECK-STATIC: "-internal-externc-isystem" // CHECK-STATIC-SAME: {{^}} "[[SYSROOT]]/usr/include/i386-gnu" // CHECK-STATIC-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/include" // CHECK-STATIC-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/usr/include" -// CHECK-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" -// CHECK-STATIC: "-static" -// CHECK-STATIC: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbeginT.o" -// CHECK-STATIC: "-L -// CHECK-STATIC-SAME: {{^}}[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0" -// CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../lib32" +// CHECK-STATIC: "{{.*}}ld" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-STATIC: "-static" +// CHECK-STATIC: "{{.*}}/usr/lib/gcc/i686-gnu/10/crtbeginT.o" +// CHECK-STATIC: "-L +// CHECK-STATIC-SAME: {{^}}[[SYSROOT]]/usr/lib/gcc/i686-gnu/10" +// CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../lib32" // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/lib/i386-gnu" // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/lib/../lib32" // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/i386-gnu" @@ -59,27 +55,13 @@ // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/lib" // CHECK-STATIC-SAME: {{^}} "-L[[SYSROOT]]/usr/lib" -// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \ -// RUN: --target=i686-pc-hurd-gnu -shared \ -// RUN: --sysroot=%S/Inputs/basic_hurd_tree \ -// RUN: | FileCheck --check-prefix=CHECK-SHARED %s -// CHECK-SHARED: "-cc1" -// CHECK-SHARED: "-isysroot" "[[SYSROOT:[^"]+]]" -// CHECK-SHARED-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/c++/4.6.0" -/// Debian specific - the path component after 'include' is i386-gnu even -/// though the installation is i686-gnu. -// CHECK-SHARED-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/i386-gnu/c++/4.6.0" -// CHECK-SHARED-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/c++/4.6.0/backward" -// CHECK-SHARED-SAME: {{^}} "-internal-isystem" "[[SYSROOT]]/usr/local/include" -// CHECK-SHARED: "-internal-externc-isystem" -// CHECK-SHARED-SAME: {{^}} "[[SYSROOT]]/usr/include/i386-gnu" -// CHECK-SHARED-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/include" -// CHECK-SHARED-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/usr/include" -// CHECK-SHARED: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" -// CHECK-SHARED: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbeginS.o" +// RUN: %clang -### %s --target=i686-pc-hurd-gnu --sysroot=%S/Inputs/basic_hurd_tree \ +// RUN: -shared 2>&1 | FileCheck --check-prefix=CHECK-SHARED %s +// CHECK-SHARED: "{{.*}}ld" "--sysroot=[[SYSROOT:[^"]+]]" +// CHECK-SHARED: "{{.*}}/usr/lib/gcc/i686-gnu/10/crtbeginS.o" // CHECK-SHARED: "-L -// CHECK-SHARED-SAME: {{^}}[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0" -// CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../lib32" +// CHECK-SHARED-SAME: {{^}}[[SYSROOT]]/usr/lib/gcc/i686-gnu/10" +// CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/10/../../../../lib32" // CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/lib/i386-gnu" // CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/lib/../lib32" // CHECK-SHARED-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/i386-gnu" @@ -92,7 +74,7 @@ // RUN: --target=i686-pc-gnu \ // RUN: | FileCheck --check-prefix=CHECK-CROSS %s // CHECK-CROSS: "-cc1" "-triple" "i686-pc-hurd-gnu" -// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/../../../../i686-gnu/bin{{/|\\\\}}as" "--32" -// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/../../../../i686-gnu/bin{{/|\\\\}}ld" {{.*}} "-m" "elf_i386" -// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbegin.o" -// CHECK-CROSS: "-L{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/../../../../i686-gnu/lib" +// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/as" "--32" +// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/bin/ld" {{.*}} "-m" "elf_i386" +// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/crtbegin.o" +// CHECK-CROSS: "-L{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/10/../../../../i686-gnu/lib"