[PATCH] powerpc - Use KBUILD_CFLAGS and similar

Subsystems: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

STALE6777d

2 messages, 2 authors, 2008-04-07 · open the first message on its own page

[PATCH] powerpc - Use KBUILD_CFLAGS and similar

From: Bastian Blank <hidden>
Date: 2008-03-02 19:33:17

Hi folks

The attached patch changes the powerpc main Makefile from using the override
make directive to KBUILD_CFLAGS and similar.

The override approach breaks with both variants "CC=gcc-4.3 make" and
"make CC=gcc-4.3". The first ignores the given value completely because
the toplevel Makefile includes a CC definition:

| $ CC="gcc-4.3" make V=1
[...]
|  gcc -m64 -Wp,-MD,init/.main.o.d

The second does not add -m64:
| $ make CC="gcc-4.3" V=1
[...]
|  gcc-4.3 -Wp,-MD,arch/powerpc/kernel/.asm-offsets.s.d

The patch changes the CC, AS and LD overrides into changes of
KBUILD_CFLAGS, KBUILD_AFLAGS and LDFLAGS similar to arch/s390/Makefile.

Signed-off-by: Bastian Blank <redacted>
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 1c6ce35..b267c60 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -63,9 +63,9 @@ endif
 UTS_MACHINE := $(OLDARCH)
 
 ifeq ($(HAS_BIARCH),y)
-override AS    += -a$(CONFIG_WORD_SIZE)
-override LD    += -m elf$(CONFIG_WORD_SIZE)ppc
-override CC    += -m$(CONFIG_WORD_SIZE)
+LDFLAGS                := -m elf$(CONFIG_WORD_SIZE)ppc
+KBUILD_CFLAGS  += -m$(CONFIG_WORD_SIZE)
+KBUILD_AFLAGS  += -m$(CONFIG_WORD_SIZE)
 override AR    := GNUTARGET=elf$(CONFIG_WORD_SIZE)-powerpc $(AR)
 endif
 
-- 
Men will always be men -- no matter where they are.
		-- Harry Mudd, "Mudd's Women", stardate 1329.8

Re: [PATCH] powerpc - Use KBUILD_CFLAGS and similar

From: Paul Mackerras <hidden>
Date: 2008-04-07 03:27:50

Bastian Blank writes:
The attached patch changes the powerpc main Makefile from using the override
make directive to KBUILD_CFLAGS and similar.
I get build failures on all 64-bit targets with this patch.  It ends
up using both -m32 and -m64 on the gcc command line for assembling .S
files.

Paul.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help