sthibaul created this revision. sthibaul requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
f26341840253 <https://reviews.llvm.org/rGf26341840253e15ab07c9e7657338038888fd3e4> ("[Driver] Gnu.cpp: remove obsoleted i386 triple detection from end-of-life distribution versions") dropped the i686-gnu gcc path, but GNU/Hurd's gcc is actually using it, and not i386. This fixes the gcc path and update the tests to reflect it. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D101317 Files: clang/lib/Driver/ToolChains/Gnu.cpp clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/i386-gnu/bin/as clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/i386-gnu/bin/ld clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/i386-gnu/lib/.keep clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/i686-gnu/bin/as clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/i686-gnu/bin/ld clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/i686-gnu/lib/.keep clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/crtbegin.o clang/test/Driver/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbegin.o clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/crtbegin.o clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/crtbeginS.o clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/crtbeginT.o clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbegin.o clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbeginS.o clang/test/Driver/Inputs/basic_hurd_tree/usr/lib/gcc/i686-gnu/4.6.0/crtbeginT.o clang/test/Driver/hurd.c Index: clang/test/Driver/hurd.c =================================================================== --- clang/test/Driver/hurd.c +++ clang/test/Driver/hurd.c @@ -11,7 +11,7 @@ // CHECK: "-internal-externc-isystem" "[[SYSROOT]]/usr/include" // CHECK: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" // CHECK: "-dynamic-linker" "/lib/ld.so" -// CHECK: "{{.*}}/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbegin.o" +// CHECK: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbegin.o" // CHECK: "-L[[SYSROOT]]/lib/i386-gnu" // CHECK: "-L[[SYSROOT]]/lib/../lib32" // CHECK: "-L[[SYSROOT]]/usr/lib/i386-gnu" @@ -33,7 +33,7 @@ // CHECK-STATIC: "-internal-externc-isystem" "[[SYSROOT]]/usr/include" // CHECK-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" // CHECK-STATIC: "-static" -// CHECK-STATIC: "{{.*}}/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbeginT.o" +// CHECK-STATIC: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbeginT.o" // CHECK-STATIC: "-L[[SYSROOT]]/lib/i386-gnu" // CHECK-STATIC: "-L[[SYSROOT]]/lib/../lib32" // CHECK-STATIC: "-L[[SYSROOT]]/usr/lib/i386-gnu" @@ -53,7 +53,7 @@ // CHECK-SHARED: "-internal-externc-isystem" "[[SYSROOT]]/include" // CHECK-SHARED: "-internal-externc-isystem" "[[SYSROOT]]/usr/include" // CHECK-SHARED: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" -// CHECK-SHARED: "{{.*}}/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbeginS.o" +// CHECK-SHARED: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbeginS.o" // CHECK-SHARED: "-L[[SYSROOT]]/lib/i386-gnu" // CHECK-SHARED: "-L[[SYSROOT]]/lib/../lib32" // CHECK-SHARED: "-L[[SYSROOT]]/usr/lib/i386-gnu" @@ -67,7 +67,7 @@ // RUN: | FileCheck --check-prefix=CHECK-CROSS %s // CHECK-CROSS-NOT: warning: // CHECK-CROSS: "-cc1" "-triple" "i386-pc-hurd-gnu" -// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/../../../../i386-gnu/bin{{/|\\\\}}as" "--32" -// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/../../../../i386-gnu/bin{{/|\\\\}}ld" {{.*}} "-m" "elf_i386" -// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbegin.o" -// CHECK-CROSS: "-L{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/../../../../i386-gnu/lib" +// 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" Index: clang/lib/Driver/ToolChains/Gnu.cpp =================================================================== --- clang/lib/Driver/ToolChains/Gnu.cpp +++ clang/lib/Driver/ToolChains/Gnu.cpp @@ -2115,7 +2115,7 @@ "i686-pc-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux", "i386-redhat-linux", "i586-suse-linux", "i686-montavista-linux", - "i686-linux-android", "i386-gnu", + "i686-linux-android", "i686-gnu", }; static const char *const M68kLibDirs[] = {"/lib"};
Index: clang/test/Driver/hurd.c =================================================================== --- clang/test/Driver/hurd.c +++ clang/test/Driver/hurd.c @@ -11,7 +11,7 @@ // CHECK: "-internal-externc-isystem" "[[SYSROOT]]/usr/include" // CHECK: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" // CHECK: "-dynamic-linker" "/lib/ld.so" -// CHECK: "{{.*}}/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbegin.o" +// CHECK: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbegin.o" // CHECK: "-L[[SYSROOT]]/lib/i386-gnu" // CHECK: "-L[[SYSROOT]]/lib/../lib32" // CHECK: "-L[[SYSROOT]]/usr/lib/i386-gnu" @@ -33,7 +33,7 @@ // CHECK-STATIC: "-internal-externc-isystem" "[[SYSROOT]]/usr/include" // CHECK-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" // CHECK-STATIC: "-static" -// CHECK-STATIC: "{{.*}}/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbeginT.o" +// CHECK-STATIC: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbeginT.o" // CHECK-STATIC: "-L[[SYSROOT]]/lib/i386-gnu" // CHECK-STATIC: "-L[[SYSROOT]]/lib/../lib32" // CHECK-STATIC: "-L[[SYSROOT]]/usr/lib/i386-gnu" @@ -53,7 +53,7 @@ // CHECK-SHARED: "-internal-externc-isystem" "[[SYSROOT]]/include" // CHECK-SHARED: "-internal-externc-isystem" "[[SYSROOT]]/usr/include" // CHECK-SHARED: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]" -// CHECK-SHARED: "{{.*}}/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbeginS.o" +// CHECK-SHARED: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbeginS.o" // CHECK-SHARED: "-L[[SYSROOT]]/lib/i386-gnu" // CHECK-SHARED: "-L[[SYSROOT]]/lib/../lib32" // CHECK-SHARED: "-L[[SYSROOT]]/usr/lib/i386-gnu" @@ -67,7 +67,7 @@ // RUN: | FileCheck --check-prefix=CHECK-CROSS %s // CHECK-CROSS-NOT: warning: // CHECK-CROSS: "-cc1" "-triple" "i386-pc-hurd-gnu" -// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/../../../../i386-gnu/bin{{/|\\\\}}as" "--32" -// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/../../../../i386-gnu/bin{{/|\\\\}}ld" {{.*}} "-m" "elf_i386" -// CHECK-CROSS: "{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0{{/|\\\\}}crtbegin.o" -// CHECK-CROSS: "-L{{.*}}/Inputs/basic_cross_hurd_tree/usr/lib/gcc/i386-gnu/4.6.0/../../../../i386-gnu/lib" +// 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" Index: clang/lib/Driver/ToolChains/Gnu.cpp =================================================================== --- clang/lib/Driver/ToolChains/Gnu.cpp +++ clang/lib/Driver/ToolChains/Gnu.cpp @@ -2115,7 +2115,7 @@ "i686-pc-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux", "i386-redhat-linux", "i586-suse-linux", "i686-montavista-linux", - "i686-linux-android", "i386-gnu", + "i686-linux-android", "i686-gnu", }; static const char *const M68kLibDirs[] = {"/lib"};
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits