From: Mike Frysinger <vapier@gentoo.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] config.mk: avoid -traditional-cpp on OS X 10.5
Date: Tue, 3 Aug 2010 19:17:38 -0400 [thread overview]
Message-ID: <1280877458-20990-1-git-send-email-vapier@gentoo.org> (raw)
Simply trying to include a basic header file like stdlib.h on OS X 10.5
and then building with -traditional-cpp fails with lots of errors like:
In file included from /usr/include/stdlib.h:63,
from test.c:3:
/usr/include/available.h:85: error: stray '#' in program
/usr/include/available.h:85: error: syntax error before numeric constant
/usr/include/available.h:86: error: stray '#' in program
In the past, I hadn't noticed because the old logic for these flags were
restricted to Darwin running on PowerPC systems while I'm running on an
Intel system. But after some recent clean ups and changes, the flag was
being applied to all Darwin systems and my host tools broke.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
Note: i've only tested Darwin/x86 as my Darwin/ppc is having hardware
trouble atm ... not sure when/if i'll get it fixed
config.mk | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/config.mk b/config.mk
index bcda776..eb95093 100644
--- a/config.mk
+++ b/config.mk
@@ -68,13 +68,13 @@ ifeq ($(HOSTOS),darwin)
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 ;)
+os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \
+ $(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; 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")
+HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc")
+HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp")
+HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress")
else
HOSTCC = gcc
endif
--
1.7.2
next reply other threads:[~2010-08-03 23:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-03 23:17 Mike Frysinger [this message]
2010-08-04 17:50 ` [U-Boot] [PATCH] config.mk: avoid -traditional-cpp on OS X 10.5 Andreas Bießmann
2010-08-08 23:12 ` Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1280877458-20990-1-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox