# Crappy GCC workarounds :(

ifndef GCC_MTUNE
   gcc_version = $(subst ., ,$(shell gcc -dumpversion))
   ifeq (2,$(word 1,$(gcc_version)))
      GCC_MTUNE = -mcpu
   else
      ifeq (3,$(word 1,$(gcc_version)))
         ifneq (,$(filter 0% 1% 2% 3%,$(word 2,$(gcc_version))))
            GCC_MTUNE = -mcpu
         endif
      endif
   endif
   ifndef GCC_MTUNE
      GCC_MTUNE = -mtune
   endif
endif

