Using gcc is wrong, we should use the cross gcc to detect the
version of gcc.
Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
#find out GCC version
-GCC_MAJOR_VERSION = $(shell gcc -dumpversion | cut -f1 -d.)
+GCC_MAJOR_VERSION = $(shell $(CC) -dumpversion | cut -f1 -d.)
# if GCC is not 4.x
ifneq ($(GCC_MAJOR_VERSION),4)
else
- GCC_MINOR_VERSION = $(shell gcc -dumpversion | cut -f2 -d.)
+ GCC_MINOR_VERSION = $(shell $(CC) -dumpversion | cut -f2 -d.)
# GCC graceful degradation
# GCC 4.2.x - added support for generic target