Commit 21366d93 authored by Tom Rini's avatar Tom Rini Committed by Linus Torvalds

[PATCH] ppc32: fix the 'checkbin' target

The checkbin target on PPC32 isn't quite right.

First, one of the tests (to ensure that some instructions are known to
gas) is never actually invoked because 'checkbin' doesn't know about
stuff set in .config, so we always have the 'else' case run.  This
changes to always running the test and telling the user to upgrade to at
least binutils 2.12.1.

The next problem is that we were doing $(AS) -o /dev/null ...  in both
that test, as well as another.  The problem here is that the checkbin
target is run on the install targets, meaning that /dev/null will get
unlinked when the test passes.  To get around this we use .tmp_gas_check
as the output file instead.

Acked by Sam.
Signed-off-by: default avatarTom Rini <trini@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 66ce1c75
...@@ -104,16 +104,15 @@ arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \ ...@@ -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 include/asm-$(ARCH)/offsets.h: arch/$(ARCH)/kernel/asm-offsets.s
$(call filechk,gen-asm-offsets) $(call filechk,gen-asm-offsets)
ifdef CONFIG_6xx # Use the file '.tmp_gas_check' for binutils tests, as gas won't output
# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later # to stdout and these checks are run even on install targets.
NEW_AS := $(shell echo dssall | $(AS) -many -o /dev/null >/dev/null 2>&1 ; echo $$?) TOUT := .tmp_gas_check
GOODVER := 2.12.1 # Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec
else # instructions.
NEW_AS := 0 AS_ALTIVEC := $(shell echo dssall | $(AS) -many -o $(TOUT) >/dev/null 2>&1 ; echo $$?)
endif
# gcc-3.4 and binutils-2.14 are a fatal combination. # gcc-3.4 and binutils-2.14 are a fatal combination.
GCC_VERSION := $(call cc-version) GCC_VERSION := $(call cc-version)
BAD_GCC_AS := $(shell echo mftb 5 | $(AS) -mppc -many -o /dev/null >/dev/null 2>&1 && echo 0 || echo 1) BAD_GCC_AS := $(shell echo mftb 5 | $(AS) -mppc -many -o $(TOUT) >/dev/null 2>&1 && echo 0 || echo 1)
checkbin: checkbin:
ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041) ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041)
...@@ -122,10 +121,11 @@ ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041) ...@@ -122,10 +121,11 @@ ifeq ($(GCC_VERSION)$(BAD_GCC_AS),03041)
@echo '*** Please upgrade your binutils or downgrade your gcc' @echo '*** Please upgrade your binutils or downgrade your gcc'
@false @false
endif endif
ifneq ($(NEW_AS),0) ifneq ($(AS_ALTIVEC),0)
echo $(AS_ALTIVEC)
@echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build ' @echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '
@echo 'correctly with old versions of binutils.' @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 @false
endif endif
@true @true
......
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