util/xcompile/xcompile: apply -march to clang as well as gcc
commit1470c7367b8fca24c86c8912aa65e969e63ff521
authorAlan Green <avg@google.com>
Wed, 22 May 2019 01:12:44 +0000 (22 11:12 +1000)
committerPatrick Georgi <pgeorgi@google.com>
Tue, 28 May 2019 20:33:37 +0000 (28 20:33 +0000)
tree8f60d62a4464bec1552b7efe721bd8a58b496c8f
parent9637856b533ee6eaa7cd3e1c1b2ec4d816f58dff
util/xcompile/xcompile: apply -march to clang as well as gcc

For x64 and x86_32 configurations, apply the -march flag to both GCC and
Clang flags.

This solves the problem of Clang-compiled coreboot failing due to Clang
emitting SSE instructions for code that is executed while SSE is not
enabled.

This patch takes functionality targeted for GCC configurations and moves
it down a few lines, modifying CFLAGS instead of GCC_CFLAGS in order
that it applies to both GCC and Clang.

This is an alternate patch to CB:32887.

Signed-off-by: Alan Green <avg@google.com>
Change-Id: I6a6a6136b01a64d46f730ed19ebbeaadaf2183df
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32923
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
util/xcompile/xcompile