[PATCH 1/1] POWERPC: Fix ppc32 compile with gcc+SSP in 2.6.16

From: John Mylchreest
Date: Sat Apr 01 2006 - 17:52:06 EST


Hi Guys,

I think the subject and patch says it all. Please see the attached minor
fix which allows ppc32 (2.6.16) to build with a non-vanilla gcc.

This could also be fixed in BOOTCFLAGS but I felt this being the more
appropriate.

Regards,
John

--
Role: Gentoo Linux Kernel Lead
Gentoo Linux: http://www.gentoo.org
Public Key: gpg --recv-keys 9C745515
Key fingerprint: A0AF F3C8 D699 A05A EC5C 24F7 95AA 241D 9C74 5515

Since ppc32 has been made to use arch/powerpc it has introduced a build-time
regression where userland CFLAGS are being leaked. This is especially obvious
when a user tries to "make zImage" with an SSP enabled gcc.

This patch restores sanity.

Signed-off-by: John Mylchreest <johnm@xxxxxxxxxx>


--- linux-2.6/arch/powerpc/boot/Makefile.orig 2006-04-01 23:36:39.000000000 +0100
+++ linux-2.6/arch/powerpc/boot/Makefile 2006-04-01 23:36:55.000000000 +0100
@@ -65,7 +65,7 @@ clean-files := $(zlib) $(zlibheader) $(z


quiet_cmd_bootcc = BOOTCC $@
- cmd_bootcc = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<
+ cmd_bootcc = $(CROSS32CC) -D__KERNEL__ -Wp,-MD,$(depfile) $(BOOTCFLAGS) -c -o $@ $<

quiet_cmd_bootas = BOOTAS $@
cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $<

Attachment: pgp00000.pgp
Description: PGP signature