From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Fri, 21 May 2010 23:33:14 +0200 Subject: [U-Boot] [PATCH] config.mk: use different host compiler for OS X 10.6 Message-ID: <1274477594-63398-1-git-send-email-andreas.devel@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- 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