Skip to contentSkip to conversation

config.mk: use different host compiler for OS X 10.6

PATCH Superseded Andreas Bießmann 2 participants 3 messages May 21, 2010 – May 22, 2010

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config.mk: use different host compiler for OS X 10.6

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

---
 config.mk |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
config.mk +10 -0
index 73b5195..be8e895 100644
@@ -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
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 config.mk: use different host compiler for OS X 10.6

config.mk HOSTSTRIP = strip · line 78

Quoted 13 lines · On Friday 21 May 2010 17:33:14 Andreas Bie?mann wrote:

ifeq ($(HOSTOS),darwin)

config.mk +4 -0
+# 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

config.mk +4 -0
+ifeq ($(DARWIN_VERSION),10.6)
+HOSTCC		= gcc
+else
 HOSTCC		= cc
 HOSTCFLAGS	+= -traditional-cpp
 HOSTLDFLAGS	+= -multiply_defined suppress
+endif

presumably this is going to remain true with 10.7+, so it'd probably make more sense to invert the check ... have the old code run with <=10.5
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100522/806954f1/attachment.pgp

#2 lore raw

PATCH 1/1 config.mk: use different host compiler for OS X 10.6

2010/5/22 Mike Frysinger <[email protected]>:

Quoted 2 lines

presumably this is going to remain true with 10.7+, so it'd probably make more sense to invert the check ... have the old code run with <=10.5

Good point. I think I have a solution.
Please see Patch v2.

regards

Andreas