c - Predefined macro to distinguish arm-none-eabi-gcc from gcc -
i building own library supposed work both on arm mbed , on linux platforms. if target arm mbed, library needs cross-compiled arm-none-eabi-gcc
while if target platform linux, library needs compiled gcc
. there predefined compiler macro allow me determine compiler invoked compile library? note raspberry pi has arm cpu needs supported cannot use arch macros.
as suggested comments , link: https://gcc.gnu.org/onlinedocs/cpp/system-specific-predefined-macros.html#system-specific-predefined-macros, macro __unix__
defined gcc
not arm-none-eabi-gcc
. if has better answer, please post it.
Comments
Post a Comment