diff mbox

ARM: makefile: work around toolchain bug in recent versions of binutils

Message ID 1343910206-3684-1-git-send-email-will.deacon@arm.com (mailing list archive)
State New, archived
Headers show

Commit Message

Will Deacon Aug. 2, 2012, 12:23 p.m. UTC
Recent upstream versions of binutils fail to assembler compressed/head.S
when passed the -march=all option:

http://lists.gnu.org/archive/html/bug-binutils/2011-04/msg00162.html

The recommended workaround from the tools folks is not to pass the
option, and instead let the assembler deduce the CPU type based on the
features used by the code.

Signed-off-by: Will Deacon <will.deacon@arm.com>
---
 arch/arm/boot/compressed/Makefile |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

Comments

Russell King - ARM Linux Aug. 2, 2012, 1:04 p.m. UTC | #1
On Thu, Aug 02, 2012 at 01:23:26PM +0100, Will Deacon wrote:
> Recent upstream versions of binutils fail to assembler compressed/head.S
> when passed the -march=all option:
> 
> http://lists.gnu.org/archive/html/bug-binutils/2011-04/msg00162.html
> 
> The recommended workaround from the tools folks is not to pass the
> option, and instead let the assembler deduce the CPU type based on the
> features used by the code.

That doesn't work for all binutils - binutils historically has had to be
told explicitly what architecture its building for and won't "deduce"
it from the code.

Maybe this needs to be a build-time test whether the assembler accepts it?
diff mbox

Patch

diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile
index bb26756..0f7f3f4 100644
--- a/arch/arm/boot/compressed/Makefile
+++ b/arch/arm/boot/compressed/Makefile
@@ -126,7 +126,6 @@  KBUILD_CFLAGS = $(subst -pg, , $(ORIG_CFLAGS))
 endif
 
 ccflags-y := -fpic -fno-builtin -I$(obj)
-asflags-y := -Wa,-march=all
 
 # Supply kernel BSS size to the decompressor via a linker symbol.
 KBSS_SZ = $(shell $(CROSS_COMPILE)size $(obj)/../../../../vmlinux | \