diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4f66d80552b..a039c5a4d55 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2014-07-23 Senthil Kumar Selvaraj + + * config/avr/avr-c.c (avr_cpu_cpp_builtins): Add __AVR_DEVICE_NAME__. + 2014-07-24 Kyle McMartin * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define. diff --git a/gcc/config/avr/avr-c.c b/gcc/config/avr/avr-c.c index c6a2f1f9471..c1ba134deee 100644 --- a/gcc/config/avr/avr-c.c +++ b/gcc/config/avr/avr-c.c @@ -299,7 +299,11 @@ avr_cpu_cpp_builtins (struct cpp_reader *pfile) if (avr_current_arch->macro) cpp_define_formatted (pfile, "__AVR_ARCH__=%s", avr_current_arch->macro); if (avr_current_device->macro) - cpp_define (pfile, avr_current_device->macro); + { + cpp_define (pfile, avr_current_device->macro); + cpp_define_formatted (pfile, "__AVR_DEVICE_NAME__=%s", + avr_current_device->name); + } if (AVR_HAVE_RAMPD) cpp_define (pfile, "__AVR_HAVE_RAMPD__"); if (AVR_HAVE_RAMPX) cpp_define (pfile, "__AVR_HAVE_RAMPX__"); if (AVR_HAVE_RAMPY) cpp_define (pfile, "__AVR_HAVE_RAMPY__");