ruiu added a comment.

In D56215#1345417 <https://reviews.llvm.org/D56215#1345417>, @joerg wrote:

> Talking from the perspective of having had to deal with thousands of packages 
> in pkgsrc over the years: it is naive to believe that there isn't a lot of 
> software that calls the linker directly for various reasons. As such, it is 
> very important to have a useful configuration in the linker by default. Such 
> a configuration is by its very nature target specific. This doesn't mean it 
> can't be done in a cross-compiler friendly way, on the contrary. Over the 
> years NetBSD has been pushing its toolchain to be as similar for the native 
> build and a cross-target as reasonable possible. Modulo the build time 
> choices in the config.h sense, the only difference between the native and 
> cross tools is the built-in default of the former.


It might be naive but I don't think it's too naive. Most programs use ld via 
cc, and I don't think it is too unreasonable to not implement a host-specific 
logic for a very small percentage of programs that directly use ld. If we do, 
that logic would be the same or very similar to the one that we already have in 
cc. I think we should avoid that duplication of the host-specific config in the 
toolchain.

I see there are pros and cons to not have host-specific config in ld. That 
said, if other operating systems can live without host-specific config in lld, 
why can't NetBSD do? I really don't like to be in a situation where only one 
operating system have a host-specific config while others don't.


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

https://reviews.llvm.org/D56215



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

Reply via email to