public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] config.mk: use different host compiler for OS X 10.6
@ 2010-05-21 21:33 Andreas Bießmann
  2010-05-22  5:14 ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Bießmann @ 2010-05-21 21:33 UTC (permalink / raw)
  To: u-boot

Compiling tools subdirectory on Mac OS X 10.6 (Snow Leopard) complains about
wrong syntax in system includes.

In file included from /usr/include/stdio.h:444,
                 from /Users/andreas/Documents/source/u-boot/include/compiler.h:26,
                 from /Users/andreas/Documents/source/u-boot/lib/crc32.c:15:
/usr/include/secure/_stdio.h:46: error: syntax error in macro parameter list

This can be fixed by reverting the workaround for prior OS X releases in
config.mk conditionally for OS X 10.6 (and maybe above, but this is not covered
by this patch).

Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
---
 config.mk |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/config.mk b/config.mk
index 73b5195..be8e895 100644
--- a/config.mk
+++ b/config.mk
@@ -64,9 +64,19 @@ HOSTSTRIP	= strip
 #
 
 ifeq ($(HOSTOS),darwin)
+# get major and minor product version (e.g. 10.6 for Snow Leopard)
+DARWIN_VERSION	= $(shell sw_vers -productVersion | cut -f 1,2 -d '.')
+
+# Snow Leopards build environmenthas no longer restrictions as described above
+# TODO find a solution to match versions greater than 10.6
+ifeq ($(DARWIN_VERSION),10.6)
+HOSTCC		= gcc
+else
 HOSTCC		= cc
 HOSTCFLAGS	+= -traditional-cpp
 HOSTLDFLAGS	+= -multiply_defined suppress
+endif
+
 else
 HOSTCC		= gcc
 endif
-- 
1.7.1

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

end of thread, other threads:[~2010-05-22 11:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-21 21:33 [U-Boot] [PATCH] config.mk: use different host compiler for OS X 10.6 Andreas Bießmann
2010-05-22  5:14 ` Mike Frysinger
2010-05-22 11:19   ` Andreas Bießmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox