https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69473
--- Comment #4 from joseph at codesourcery dot com <joseph at codesourcery dot com> --- __linux__ and __linux should always be defined for systems with the Linux kernel (plain linux only in non-ISO modes); __gnu_linux__ for systems with the Linux kernel and glibc (the nearest thing to the concept of GNU/Linux systems available to GCC). That should work for all systems using config/linux.h, which covers most but not all targets using the Linux kernel.