X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fppc%2FMakefile;h=53dd5640d3a61d625822dc6db71bb9e674cfea01;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=e15c6919a27fe88e97be4c84a2ea0f2ea44dd43d;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile index e15c6919a..53dd5640d 100644 --- a/arch/ppc/Makefile +++ b/arch/ppc/Makefile @@ -13,7 +13,7 @@ # 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;) +HAS_BIARCH := $(call cc-option-yn, -m32) ifeq ($(HAS_BIARCH),y) AS := $(AS) -a32 LD := $(LD) -m elf32ppc @@ -24,10 +24,10 @@ LDFLAGS_vmlinux := -Ttext $(KERNELLOAD) -Bstatic CPPFLAGS += -Iarch/$(ARCH) AFLAGS += -Iarch/$(ARCH) CFLAGS += -Iarch/$(ARCH) -msoft-float -pipe \ - -ffixed-r2 -Wno-uninitialized -mmultiple + -ffixed-r2 -mmultiple CPP = $(CC) -E $(CFLAGS) -CHECK := $(CHECK) -D__powerpc__=1 +CHECKFLAGS += -D__powerpc__ ifndef CONFIG_E500 CFLAGS += -mstring @@ -70,7 +70,7 @@ BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm all: zImage -AFLAGS_vmlinux.lds.o := -Upowerpc +CPPFLAGS_vmlinux.lds := -Upowerpc # All the instructions talk about "make bzImage". bzImage: zImage @@ -104,16 +104,15 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s $(call filechk,gen-asm-offsets) -ifdef CONFIG_6xx -# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later -NEW_AS := $(shell echo dssall | $(AS) -many -o /dev/null >/dev/null 2>&1 ; echo $$?) -GOODVER := 2.12.1 -else -NEW_AS := 0 -endif +# Use the file '.tmp_gas_check' for binutils tests, as gas won't output +# to stdout and these checks are run even on install targets. +TOUT := .tmp_gas_check +# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec +# instructions. +AS_ALTIVEC := $(shell echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; echo $$?) # gcc-3.4 and binutils-2.14 are a fatal combination. -GCC_VERSION := $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) -BAD_GCC_AS := $(shell echo mftb 5 | $(AS) -mppc -many -o /dev/null >/dev/null 2>&1 && echo 0 || echo 1) +GCC_VERSION := $(call cc-version) +BAD_GCC_AS := $(shell echo mftb 5 | $(AS) -mppc -many -o $(TOUT) >/dev/null 2>&1 && echo 0 || echo 1) checkbin: ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041) @@ -122,13 +121,16 @@ ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041) @echo '*** Please upgrade your binutils or downgrade your gcc' @false endif -ifneq ($(NEW_AS),0) +ifneq ($(AS_ALTIVEC),0) + echo $(AS_ALTIVEC) @echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' @echo 'correctly with old versions of binutils.' - @echo '*** Please upgrade your binutils to ${GOODVER} or newer' + @echo '*** Please upgrade your binutils to 2.12.1 or newer' @false endif @true CLEAN_FILES += include/asm-$(ARCH)/offsets.h \ - arch/$(ARCH)/kernel/asm-offsets.s + arch/$(ARCH)/kernel/asm-offsets.s \ + $(TOUT) +