How to change the linker of clang

  1. Build clang with GCC-4.9.2, when compling other application s with clang/clang++, the default linker is ld, can I replace it with other linker tool, if we can, how to do it?

I.E. can we use collect2 instead?

  1. how to specify the lib path, such as crtend.o , when we do not use the default vertion GCC?

Best Regards!
Eric Lew

1) Build clang with GCC-4.9.2, when compling other application s with
clang/clang++, the default linker is ld, can I replace it with other linker
tool, if we can, how to do it?

I.E. can we use collect2 instead?

collect2 is a sad historic artifact. It shouldn't be used. You can
specify a search directory with -B, if it contains $TARGET-ld, it will
be used.

2) how to specify the lib path, such as crtend.o , when we do not use the
default vertion GCC?

Similar, -B can be used here as well.

Joerg