* [U-Boot] [PATCH v2] config.mk: use different host compiler for OS X 10.6
@ 2010-05-22 11:17 Andreas Bießmann
2010-05-23 1:35 ` Mike Frysinger
2010-05-26 20:33 ` Wolfgang Denk
0 siblings, 2 replies; 3+ messages in thread
From: Andreas Bießmann @ 2010-05-22 11:17 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 ../source/u-boot/include/compiler.h:26,
from ../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+.
Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
---
config.mk | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/config.mk b/config.mk
index 73b5195..c4ad223 100644
--- a/config.mk
+++ b/config.mk
@@ -64,9 +64,17 @@ HOSTSTRIP = strip
#
ifeq ($(HOSTOS),darwin)
-HOSTCC = cc
-HOSTCFLAGS += -traditional-cpp
-HOSTLDFLAGS += -multiply_defined suppress
+# get major and minor product version (e.g. '10' and '6' for Snow Leopard)
+DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.')
+DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.')
+
+before-snow-leopard = $(shell if [ $(DARWIN_MAJOR_VERSION) -le 10 -a \
+ $(DARWIN_MINOR_VERSION) -le 5 ] ; then echo "$(1)"; else echo "$(2)"; fi ;)
+
+# Snow Leopards build environment has no longer restrictions as described above
+HOSTCC = $(call before-snow-leopard, "cc", "gcc")
+HOSTCFLAGS += $(call before-snow-leopard, "-traditional-cpp")
+HOSTLDFLAGS += $(call before-snow-leopard, "-multiply_defined suppress")
else
HOSTCC = gcc
endif
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] config.mk: use different host compiler for OS X 10.6
2010-05-22 11:17 [U-Boot] [PATCH v2] config.mk: use different host compiler for OS X 10.6 Andreas Bießmann
@ 2010-05-23 1:35 ` Mike Frysinger
2010-05-26 20:33 ` Wolfgang Denk
1 sibling, 0 replies; 3+ messages in thread
From: Mike Frysinger @ 2010-05-23 1:35 UTC (permalink / raw)
To: u-boot
On Saturday 22 May 2010 07:17:21 Andreas Bie?mann wrote:
> +# get major and minor product version (e.g. '10' and '6' for Snow Leopard)
> +DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.')
> +DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.')
> +
> +before-snow-leopard = $(shell if [ $(DARWIN_MAJOR_VERSION) -le 10 -a \
> + $(DARWIN_MINOR_VERSION) -le 5 ] ; then echo "$(1)"; else echo "$(2)"; fi
> ;) +
> +# Snow Leopards build environment has no longer restrictions as described
> above +HOSTCC = $(call before-snow-leopard, "cc", "gcc")
> +HOSTCFLAGS += $(call before-snow-leopard, "-traditional-cpp")
> +HOSTLDFLAGS += $(call before-snow-leopard, "-multiply_defined suppress")
it stinks that the make language isnt more flexible, but given the limitations
of it, this looks OK to me. thanks !
Acked-by: Mike Frysinger <vapier@gentoo.org>
-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/86a2fc49/attachment.pgp
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH v2] config.mk: use different host compiler for OS X 10.6
2010-05-22 11:17 [U-Boot] [PATCH v2] config.mk: use different host compiler for OS X 10.6 Andreas Bießmann
2010-05-23 1:35 ` Mike Frysinger
@ 2010-05-26 20:33 ` Wolfgang Denk
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2010-05-26 20:33 UTC (permalink / raw)
To: u-boot
Dear Andreas Bie?mann,
In message <1274527041-62757-1-git-send-email-andreas.devel@googlemail.com> you wrote:
> 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 ../source/u-boot/include/compiler.h:26,
> from ../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+.
>
> Signed-off-by: Andreas Bie?mann <andreas.devel@googlemail.com>
> ---
> config.mk | 14 +++++++++++---
> 1 files changed, 11 insertions(+), 3 deletions(-)
Applied,t hanks.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Time is an illusion perpetrated by the manufacturers of space.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-05-26 20:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-22 11:17 [U-Boot] [PATCH v2] config.mk: use different host compiler for OS X 10.6 Andreas Bießmann
2010-05-23 1:35 ` Mike Frysinger
2010-05-26 20:33 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox