From 4c8fa2aad28fa5290478317a99e1323ade714677 Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Tue, 7 Jul 2015 00:32:47 +0200 Subject: Unconditionally compile romstage with -Wa,--divide The option --divide is required by our assembler to ensure that '/' is not parsed as a comment sign but as a division, because some of the cache as ram code is using divisions. The --divide parameter has been part of the GNU as since binutils 2.17. Hence, compile romstage (which contains cache as ram init) with -Wa,--divide unconditionally instead of probing for it and adding it to all compiler invocations (because that is causing random trouble with clang when compiling the SMM code and calling gcc with --divide instead of -Wa,--divide) Change-Id: Ideefb2a243dc1d657ba415a99c1f8ab1d93800e0 Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/10817 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/arch/x86/Makefile.inc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/arch/x86') diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc index f502bbe03e..20740a4df1 100644 --- a/src/arch/x86/Makefile.inc +++ b/src/arch/x86/Makefile.inc @@ -247,6 +247,9 @@ $(objgenerated)/crt0.S: $$(crt0s) # Compiling crt0 with -g seems to trigger https://sourceware.org/bugzilla/show_bug.cgi?id=6428 romstage-S-ccopts += -I. -g0 +# Some cache as ram code is doing divisions +romstage-S-ccopts +=-Wa,--divide + endif # CONFIG_ARCH_ROMSTAGE_X86_32 / CONFIG_ARCH_ROMSTAGE_X86_64 ############################################################################### -- cgit v1.2.3