All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] kbuild: Add clang detection
@ 2016-01-20  1:39 Tom Rini
  2016-01-20  1:39 ` [U-Boot] [PATCH 2/2] arm, powerpc: Update cc-version tests to check for cc-name as well Tom Rini
  2016-01-25 21:28 ` [U-Boot] [U-Boot,1/2] kbuild: Add clang detection Tom Rini
  0 siblings, 2 replies; 4+ messages in thread
From: Tom Rini @ 2016-01-20  1:39 UTC (permalink / raw)
  To: u-boot

Adapted from:

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH 2/2] arm, powerpc: Update cc-version tests to check for cc-name as well
  2016-01-20  1:39 [U-Boot] [PATCH 1/2] kbuild: Add clang detection Tom Rini
@ 2016-01-20  1:39 ` Tom Rini
  2016-01-25 21:28   ` [U-Boot] [U-Boot, " Tom Rini
  2016-01-25 21:28 ` [U-Boot] [U-Boot,1/2] kbuild: Add clang detection Tom Rini
  1 sibling, 1 reply; 4+ messages in thread
From: Tom Rini @ 2016-01-20  1:39 UTC (permalink / raw)
  To: u-boot

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     |    3 ++-
 arch/powerpc/config.mk |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/config.mk b/arch/arm/config.mk
index 0550225..a3e14a8 100644
--- a/arch/arm/config.mk
+++ b/arch/arm/config.mk
@@ -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.'; \
diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk
index 6b44a37..b0ed374 100644
--- a/arch/powerpc/config.mk
+++ b/arch/powerpc/config.mk
@@ -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
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [U-Boot,1/2] kbuild: Add clang detection
  2016-01-20  1:39 [U-Boot] [PATCH 1/2] kbuild: Add clang detection Tom Rini
  2016-01-20  1:39 ` [U-Boot] [PATCH 2/2] arm, powerpc: Update cc-version tests to check for cc-name as well Tom Rini
@ 2016-01-25 21:28 ` Tom Rini
  1 sibling, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-01-25 21:28 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 19, 2016 at 08:39:01PM -0500, Tom Rini wrote:

> Adapted from:
> 
> >From 5631d9c429857194bd55d7bcd8fa5bdd1a9899a3 Mon Sep 17 00:00:00 2001
> From: Michal Marek <mmarek@suse.com>
> Date: Wed, 19 Aug 2015 17:36:41 +0200
> Subject: [PATCH 1/1] kbuild: Fix clang detection
> 
> We cannot detect clang before including the arch Makefile, because that
> can set the default cross compiler. We also cannot detect clang after
> including the arch Makefile, because powerpc wants to know about clang.
> Solve this by using an deferred variable. This costs us a few shell
> invocations, but this is only a constant number.
> 
> Reported-by: Behan Webster <behanw@converseincode.com>
> Reported-by: Anton Blanchard <anton@samba.org>
> Signed-off-by: Michal Marek <mmarek@suse.com>
> 
> in the Linux kernel.
> 
> This will allow us to make better decisions about when to run tests
> later on for gcc features.
> 
> Signed-off-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160125/85fcbc57/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [U-Boot, 2/2] arm, powerpc: Update cc-version tests to check for cc-name as well
  2016-01-20  1:39 ` [U-Boot] [PATCH 2/2] arm, powerpc: Update cc-version tests to check for cc-name as well Tom Rini
@ 2016-01-25 21:28   ` Tom Rini
  0 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2016-01-25 21:28 UTC (permalink / raw)
  To: u-boot

On Tue, Jan 19, 2016 at 08:39:02PM -0500, Tom Rini wrote:

> 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>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160125/7a95ff80/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-01-25 21:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-20  1:39 [U-Boot] [PATCH 1/2] kbuild: Add clang detection Tom Rini
2016-01-20  1:39 ` [U-Boot] [PATCH 2/2] arm, powerpc: Update cc-version tests to check for cc-name as well Tom Rini
2016-01-25 21:28   ` [U-Boot] [U-Boot, " Tom Rini
2016-01-25 21:28 ` [U-Boot] [U-Boot,1/2] kbuild: Add clang detection Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.