Re: [PATCH trace-cmd 3/3] Revert "trace-cmd: Use conditional assignmentof CC and AR"
From: Darren Hart
Date: Wed Mar 09 2011 - 20:27:38 EST
On 03/09/2011 03:58 PM, David Sharp wrote:
This reverts commit 6c696cec3f264a9399241b6e648f58bc97117d49.
Make has default values CC and AR of 'cc' and 'ar' respectively. This means
that "CC ?= anything" will never have effect, because CC is always already set.
Because of this, 6c696cec makes setting CROSS_COMPILE from the command line or
environment useless.
The problem with this approach is it prevents the user from setting CC
explicitly with the environment which is a very common way of using a
specific version of gcc (for example). It also places restrictions on
the filename of the compiler (it must end in gcc - so gcc-4.5.1 cannot
work), this isn't acceptable.
You could use CC=your-cross-compiler, and if that doesn't work for you,
you could prepare a patch that conditionally sets CC only if
CROSS_COMPILE is set, but please do not simply revert this patch which
solved a real problem with the Makefile.
--
Darren
Signed-off-by: David Sharp<dhsharp@xxxxxxxxxx>
Cc: Darren Hart<dvhart@xxxxxxxxxxxxxxx>
Cc: Steven Rostedt<rostedt@xxxxxxxxxxx>
---
Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index 169fcbc..fa37df5 100644
--- a/Makefile
+++ b/Makefile
@@ -13,8 +13,8 @@ FILE_VERSION = 6
MAKEFLAGS += --no-print-directory
-CC ?= $(CROSS_COMPILE)gcc
-AR ?= $(CROSS_COMPILE)ar
+CC = $(CROSS_COMPILE)gcc
+AR = $(CROSS_COMPILE)ar
EXT = -std=gnu99
INSTALL = install
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/