Am 03/03/2015 um 02:21 PM schrieb Senthil Kumar Selvaraj:
On Mon, Mar 02, 2015 at 08:40:17PM +0100, Georg-Johann Lay wrote:
BTW, anyone knows what -march= is good for?  It allows all kinds of silly
option combinations like "-march=avrtiny -mmcu=atmega8" without any
complaints.

IIRC, -march was added because replacing -mmcu=<device> to
-mmcu=<arch> in the driver's self specs broke multilib selection - the
driver always acted as if no -mmcu was specified. Adding
a new option (-march), translating mmcu=<device> to march=<arch> and then
basing t-multilib on that worked ok.

Okay. For me it works with -mmcu=, cf. the follow-up patch https://gcc.gnu.org/ml/gcc-patches/2015-03/msg00477.html

Two more questions

1)
What is the new macro __AVR_DEV_LIB_NAME__ for?
It uses avr_mcu_t.library_name. This field contained a part of the crt.o file name like "m8" for atmega8's crtm8.o.

The new naming convention is that device libs are located in dev/atmega8/libdev.a and startup in dev/atmega8/crt1.o.

The current definition of __AVR_DEV_LIB_NAME__ should be "atmega8" and not "m8", hence always that same as __AVR_DEVICE_NAME__.

This macro is not documented in the documentation and useless. If it is not needed and the .library_name field is dead, I'd propose to clean up both.

2)
What about -mpmem-wrap-around resp. ld's --pmem-wrap-around= ?
The wrap around moduli are currently hard coded in specs and just cover a few, very old devices. Presumably that is option-rot?

Does relaxation still need that option to operate correctly? If not, I'd clean that up, too

Johann

Reply via email to