Index: clang/lib/Basic/Targets/AVR.cpp =================================================================== --- clang/lib/Basic/Targets/AVR.cpp +++ clang/lib/Basic/Targets/AVR.cpp @@ -377,7 +377,9 @@ MacroBuilder &Builder) const { Builder.defineMacro("AVR"); Builder.defineMacro("__AVR"); + Builder.defineMacro("__avr"); Builder.defineMacro("__AVR__"); + Builder.defineMacro("__avr__"); Builder.defineMacro("__ELF__"); if (!this->CPU.empty()) { Index: clang/test/Preprocessor/avr-common.c =================================================================== --- clang/test/Preprocessor/avr-common.c +++ clang/test/Preprocessor/avr-common.c @@ -4,3 +4,5 @@ // CHECK: #define __AVR 1 // CHECK: #define __AVR__ 1 // CHECK: #define __ELF__ 1 +// CHECK: #define __avr 1 +// CHECK: #define __avr__ 1