lenary added a comment.

LGTM.

I looked at what `g++` and `gcc` do (my riscv64-unknown-elf toolchain):

- `gcc`: Passes `-lgcc --start-group -lc -lgloss --end-group -lgcc` to the 
linker
- `g++`: Passes `"-lstdc++" -lm -lgcc --start-group -lc -lgloss --end-group 
-lgcc` to the linker

This patch:

- `clang` passes `"--start-group" "-lc" "-lgloss" "--end-group" "-lgcc"` to the 
linker
- `clang++` passes `"-lstdc++" "--start-group" "-lc" "-lgloss" "--end-group" 
"-lgcc"` to the linker

I think these are all compatible. I'm not sure where the `-lm` is coming from 
in the g++ invocation vs the `clang++` invocation, but given we have TODOs in 
this driver code around C++, I don't think that needs to be fixed in this patch.


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

https://reviews.llvm.org/D68407



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

Reply via email to