[U-Boot] [PATCH] config.mk: use different host compiler for OS X 10.6
Andreas Bießmann
andreas.devel at googlemail.com
Fri May 21 23:33:14 CEST 2010
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 at 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
More information about the U-Boot
mailing list