hvdijk added inline comments.

================
Comment at: clang/test/Driver/baremetal.cpp:37
 // CHECK-V6M-DEFAULTCXX: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" 
"{{.*}}.o" "-Bstatic"
-// CHECK-V6M-DEFAULTCXX-SAME: 
"-L{{[^"]*}}{{[/\\]+}}lib{{(64)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
+// CHECK-V6M-DEFAULTCXX-SAME: 
"-L{{[^"]*}}{{[/\\]+}}lib{{(64|x32)?}}{{[/\\]+}}clang{{[/\\]+}}{{.*}}{{[/\\]+}}lib{{[/\\]+}}baremetal"
 // CHECK-V6M-DEFAULTCXX-SAME: 
"-L{{[^"]*}}{{[/\\]+}}Inputs{{[/\\]+}}baremetal_arm{{[/\\]+}}lib"
----------------
MaskRay wrote:
> hvdijk wrote:
> > hvdijk wrote:
> > > MaskRay wrote:
> > > > The new x32 does not make sense. Non-x86 targets (--target) should not 
> > > > have to deal with x32 directories.
> > > This is a single string used for all targets and duplicated for all 
> > > targets (lib64 was already included here too, despite armv6m-none-eabi 
> > > not using lib64), so I preserved that and updated it for all targets.
> > Actually, on closer inspection, we really need that here even for ARM: this 
> > is not the libdir used by the target, this is the libdir used by the host.
> I think we have a problem, then.  With `--target=armv6m-none-eabi`, the host 
> path component `lib64` should not appear. Can you investigate why this 
> happens?
> 
> My arm-linux-gnu output. Note, if the directories do not exist, some entries 
> may not show up in the output.
> ```
> % fclang++ --target=arm-linux-gnu a.cc '-###' |& sed -E 's/ "?-[LiI]/\n&/g'
> ...
>  "-L/usr/lib/gcc-cross/arm-linux-gnueabi/10"
>  
> "-L/usr/lib/gcc-cross/arm-linux-gnueabi/10/../../../../arm-linux-gnueabi/lib/../lib"
>  "-L/usr/lib/gcc-cross/arm-linux-gnueabi/10/../../../../lib"
>  "-L/lib/arm-linux-gnueabi"
>  "-L/lib/../lib"
>  "-L/usr/lib/arm-linux-gnueabi"
>  "-L/usr/lib/../lib"
>  "-L/usr/lib/gcc-cross/arm-linux-gnueabi/10/../../../../arm-linux-gnueabi/lib"
>  "-L/tmp/RelA/bin/../lib"
>  "-L/lib"
>  "-L/usr/lib"
> ```
I am seeing "ld.lld" "/tmp/baremetal-876ced.o" "-Bstatic" 
"-L/home/harald/llvm-project/build/libx32/clang/13.0.0/lib/baremetal" [...]. 
`libx32` appears here because I configured with `-DLLVM_LIBDIR_SUFFIX=x32`. You 
should see `lib64` here if you configure with `-DLLVM_LIBDIR_SUFFIX=64`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D52050

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to