Commit 2f98ffcd authored by Olaf Hering's avatar Olaf Hering Committed by Linus Torvalds

[PATCH] ppc32: biarch gcc support

A native powerpc64-linux gcc can not compile a ppc32 kernel properly.  This
patch fixes it.  It was copied from ppc64.  The change to vmlinux.lds.S
fixes this error:

ld: warning: powerpc:common architecture of input file `init/built-in.o' is
incompatible with powerpc:common64 output
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 267bc3d4
......@@ -13,6 +13,13 @@
# This must match PAGE_OFFSET in include/asm-ppc/page.h.
KERNELLOAD := $(CONFIG_KERNEL_START)
HAS_BIARCH := $(shell if $(CC) -m32 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi;)
ifeq ($(HAS_BIARCH),y)
AS := $(AS) -a32
LD := $(LD) -m elf32ppc
CC := $(CC) -m32
endif
LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic
CPPFLAGS += -Iarch/$(ARCH)
AFLAGS += -Iarch/$(ARCH)
......
#include <asm-generic/vmlinux.lds.h>
OUTPUT_ARCH(powerpc)
OUTPUT_ARCH(powerpc:common)
jiffies = jiffies_64 + 4;
SECTIONS
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment