[patch/Makefile] Fix cc-option call for xcompiles

From: Randolph Chung
Date: Wed Oct 27 2004 - 18:28:16 EST


If an arch Makefile overrides CROSS_COMPILE (e.g. parisc, mips, ...)
then the cc-option call in the main Makefile uses the wrong compiler
to check for options.

Signed-off-by: Randolph Chung <tausq@xxxxxxxxxx>

Index: Makefile
===================================================================
RCS file: /var/cvs/linux-2.6/Makefile,v
retrieving revision 1.281
diff -u -p -r1.281 Makefile
--- Makefile 27 Oct 2004 21:23:19 -0000 1.281
+++ Makefile 27 Oct 2004 23:16:30 -0000
@@ -494,10 +494,10 @@ ifdef CONFIG_DEBUG_INFO
CFLAGS += -g
endif

+include $(srctree)/arch/$(ARCH)/Makefile
+
# warn about C99 declaration after statement
CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
-
-include $(srctree)/arch/$(ARCH)/Makefile

# Default kernel image to build when no specific target is given.
# KBUILD_IMAGE may be overruled on the commandline or

--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
-
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/