From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] tools: Use override when changing CC, CFLAGS, etc.
Date: Mon, 19 Oct 2009 16:24:35 -0500 [thread overview]
Message-ID: <20091019212435.GA31339@loki.buserror.net> (raw)
If the user has specified a CC or similar on the command line, that is the
cross compiler, not the host compiler. Override is needed to keep these
assignments from being ignored in that case.
Signed-off-by: Scott Wood <scottwood@freescale.com>
---
tools/Makefile | 10 +++++-----
tools/gdb/Makefile | 6 +++---
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/tools/Makefile b/tools/Makefile
index 2a9a9fd..6bf3fde 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -139,21 +139,21 @@ LIBFDT_OBJS := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y))
# Use native tools and options
# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
#
-CPPFLAGS = -idirafter $(SRCTREE)/include \
+override CPPFLAGS = -idirafter $(SRCTREE)/include \
-idirafter $(OBJTREE)/include2 \
-idirafter $(OBJTREE)/include \
-I $(SRCTREE)/libfdt \
-I $(SRCTREE)/tools \
-DTEXT_BASE=$(TEXT_BASE) -DUSE_HOSTCC \
-D__KERNEL_STRICT_NAMES
-CFLAGS = $(HOSTCFLAGS) $(CPPFLAGS) -O
+override CFLAGS = $(HOSTCFLAGS) $(CPPFLAGS) -O
# No -pedantic switch to avoid libfdt compilation warnings
FIT_CFLAGS = -Wall $(CPPFLAGS) -O
-AFLAGS = -D__ASSEMBLY__ $(CPPFLAGS)
-CC = $(HOSTCC)
-STRIP = $(HOSTSTRIP)
+override AFLAGS = -D__ASSEMBLY__ $(CPPFLAGS)
+override CC = $(HOSTCC)
+override STRIP = $(HOSTSTRIP)
MAKEDEPEND = makedepend
all: $(obj).depend $(BINS) $(LOGO-y) subdirs
diff --git a/tools/gdb/Makefile b/tools/gdb/Makefile
index 0a5687d..dca97f4 100644
--- a/tools/gdb/Makefile
+++ b/tools/gdb/Makefile
@@ -37,9 +37,9 @@ BINS := $(addprefix $(obj),$(BINS))
#
# Use native tools and options
#
-CPPFLAGS = -I$(BFD_ROOT_DIR)/include
-CFLAGS = $(HOSTCFLAGS) -O $(CPPFLAGS)
-CC = $(HOSTCC)
+override CPPFLAGS = -I$(BFD_ROOT_DIR)/include
+override CFLAGS = $(HOSTCFLAGS) -O $(CPPFLAGS)
+override CC = $(HOSTCC)
MAKEDEPEND = makedepend
HOSTOS := $(shell uname -s | sed -e 's/\([Cc][Yy][Gg][Ww][Ii][Nn]\).*/cygwin/')
--
1.6.4.4
next reply other threads:[~2009-10-19 21:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 21:24 Scott Wood [this message]
2009-10-19 21:42 ` [U-Boot] [PATCH 2/2] tools: Use override when changing CC, CFLAGS, etc Mike Frysinger
2009-10-19 21:56 ` Scott Wood
2009-10-19 22:37 ` [U-Boot] [PATCH 2/2] tools: Use override when changing CC, CFLAGS , etc Mike Frysinger
2009-10-20 21:53 ` [U-Boot] [PATCH 2/2] tools: Use override when changing CC, CFLAGS, etc Scott Wood
2009-10-21 1:17 ` [U-Boot] [PATCH 2/2] tools: Use override when changing CC, CFLAGS , etc Mike Frysinger
2009-10-19 22:35 ` [U-Boot] [PATCH 2/2] tools: Use override when changing CC, CFLAGS, etc 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=20091019212435.GA31339@loki.buserror.net \
--to=scottwood@freescale.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.