]> git.sur5r.net Git - u-boot/commitdiff
arm, powerpc: Update cc-version tests to check for cc-name as well
authorTom Rini <trini@konsulko.com>
Wed, 20 Jan 2016 01:39:02 +0000 (20:39 -0500)
committerTom Rini <trini@konsulko.com>
Mon, 25 Jan 2016 15:39:44 +0000 (10:39 -0500)
For compatibility clang will report some gcc version.  However since we
are checking gcc versions in order to then fail to build, we should
limit these tests only to when we are using gcc and not clang.

Signed-off-by: Tom Rini <trini@konsulko.com>
arch/arm/config.mk
arch/powerpc/config.mk

index 0550225581f40f858cca4e88e7a6ad7cdcbc842e..a3e14a862b15af8267283d3ffa817172042db296 100644 (file)
@@ -40,7 +40,8 @@ ifeq ($(CONFIG_SYS_THUMB_BUILD),y)
 archprepare: checkthumb
 
 checkthumb:
-       @if test "$(call cc-version)" -lt "0404"; then \
+       @if test "$(call cc-name)" = "gcc" -a \
+                       "$(call cc-version)" -lt "0404"; then \
                echo -n '*** Your GCC does not produce working '; \
                echo 'binaries in THUMB mode.'; \
                echo '*** Your board is configured for THUMB mode.'; \
index 6b44a3709a4afd58c7d765784a46eb816a9f718d..b0ed374563adb66f107fb127b0af328102b12109 100644 (file)
@@ -41,7 +41,8 @@ archprepare: checkgcc4
 # that U-Boot wants.
 # See http://lists.denx.de/pipermail/u-boot/2012-September/135156.html
 checkgcc4:
-       @if test $(call cc-version) -lt 0400; then \
+       @if test "$(call cc-name)" = "gcc" -a \
+                       $(call cc-version) -lt 0400; then \
                echo -n '*** Your GCC is too old, please upgrade to GCC 4.x or newer'; \
                false; \
        fi