[PATCH] D142595: [Driver][AVR] Don't emit default '-Tdata' when '-T' is specified

Ben Shi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 30 19:19:18 PST 2023


benshi001 added a comment.

In D142595#4092435 <https://reviews.llvm.org/D142595#4092435>, @MaskRay wrote:

> How does avr-gcc know whether the user provides a linker script?
>
> I really don't like adding a default `-Tdata=` when it can interfere with common uses of specifying a linker script. In these situations drivers not adding default options is usually better than guessing the user intention.
> If the use case is somewhat strange, we can document it.

My option,

1. we remove default `-Tdata`
2. we add a default `-T avr.sc` (provided by bintuils as default) at an early position of avr-ld's options.
3. If user specified `-T xx.lds`, append user's at an late position, then user's will win, the default will lose.


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

https://reviews.llvm.org/D142595



More information about the cfe-commits mailing list