[PATCH] D101317: hurd: Fix i386 research path

Samuel Thibault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 27 09:22:11 PDT 2021


sthibaul updated this revision to Diff 340875.
sthibaul marked an inline comment as done.
sthibaul added a comment.

Fix triplet


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101317/new/

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
@@ -1,5 +1,5 @@
 // RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
-// RUN:     --target=i386-pc-gnu \
+// RUN:     --target=i686-pc-hurd-gnu \
 // RUN:     --sysroot=%S/Inputs/basic_hurd_tree \
 // RUN:   | FileCheck --check-prefix=CHECK %s
 // CHECK-NOT: warning:
@@ -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"
@@ -20,7 +20,7 @@
 // CHECK: "-L[[SYSROOT]]/usr/lib"
 
 // RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
-// RUN:     --target=i386-pc-gnu -static \
+// RUN:     --target=i686-pc-hurd-gnu -static \
 // RUN:     --sysroot=%S/Inputs/basic_hurd_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-STATIC %s
 // CHECK-STATIC-NOT: warning:
@@ -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"
@@ -42,7 +42,7 @@
 // CHECK-STATIC: "-L[[SYSROOT]]/usr/lib"
 
 // RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
-// RUN:     --target=i386-pc-gnu -shared \
+// RUN:     --target=i686-pc-hurd-gnu -shared \
 // RUN:     --sysroot=%S/Inputs/basic_hurd_tree \
 // RUN:   | FileCheck --check-prefix=CHECK-SHARED %s
 // CHECK-SHARED-NOT: warning:
@@ -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"
@@ -63,11 +63,11 @@
 
 // RUN: %clang -### -o %t %s 2>&1 -no-integrated-as -fuse-ld=ld \
 // RUN:     --gcc-toolchain=%S/Inputs/basic_cross_hurd_tree/usr \
-// RUN:     --target=i386-pc-gnu \
+// RUN:     --target=i686-pc-hurd-gnu \
 // 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: "-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"
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"};


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101317.340875.patch
Type: text/x-patch
Size: 4455 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210427/2ce57d26/attachment.bin>


More information about the cfe-commits mailing list