Skip to contentSkip to conversation

Fix cc-option call for xcompiles

patch/Makefile Randolph Chung 2 participants 3 messages Oct 27, 2004 – Oct 28, 2004 Kbuild

lore
Share & tools
lore
#0 lore raw

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.

Index: Makefile
===================================================================
RCS file: /var/cvs/linux-2.6/Makefile,v
retrieving revision 1.281

Makefile +2 -2
diff -u -p -r1.281 Makefile
@@ -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
Signature · 3 lines
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
#1 lore raw
Quoted 9 lines · Randolph Chung

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

Can you please make your patches be -p1 based? With CVS, I think just using "cvs diff -u ." should do it.

Otherwise I'll have to edit the patch to make it work with the tools (not a big deal for a single file diff, but..)

Linus

#2 lore raw
Quoted 2 lines

Can you please make your patches be -p1 based? With CVS, I think just using "cvs diff -u ." should do it.

well, cvs diff is what i use... but ok, i'll make it -p1...

Index: Makefile
===================================================================
RCS file: /var/cvs/linux-2.6/Makefile,v
retrieving revision 1.281

Makefile +2 -2
diff -u -p -r1.281 Makefile
@@ -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
Signature · 3 lines
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/