[PATCH] D101331: hurd: Detect libstdc++ include paths on Debian Hurd i386
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 26 19:53:05 PDT 2021
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: clang/test/Driver/hurd.cpp:21
+// CHECK: "-dynamic-linker" "/lib/ld.so"
+// CHECK: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbegin.o"
+// CHECK: "-L
----------------
Since we now unsupport Windows, `{{/|\\\\}}` -> `/`
Consider replacing gcc 4.6.0 with the actual gcc version which may be higher, just to reflect the truth.
We may want to unsupport too old GCC versions if nobody uses.
But perhaps these cleanups can be done separately.
================
Comment at: clang/test/Driver/hurd.cpp:49
+// CHECK-STATIC-SAME: {{^}} "-internal-externc-isystem" "[[SYSROOT]]/usr/include"
+// CHECK-STATIC: "{{.*}}ld{{(.exe)?}}" "--sysroot=[[SYSROOT:[^"]+]]"
+// CHECK-STATIC: "-static"
----------------
Drop `{{(.exe)?}}`
I think `"{{.*}}ld{{(.exe)?}}"` can be cleaned as well. Is it `i686-gnu-ld` if you add a fake executable `bin/i686-gnu-ld`?
If it is exactly `ld`, will be good to test the exact form. `linux-ld.c` is a big messy and probably not a good reference.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101331/new/
https://reviews.llvm.org/D101331
More information about the cfe-commits
mailing list