From 99cf7293f9eb943e00e2ebca6eee0e36eaa801bd Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Mon, 12 Feb 2007 13:38:06 +0000 Subject: - add cc-option and use it to check for stuff that is benefical for PREFER_IMA - backport the libbackend.o gcov-iov.h dependency fixup from 4.2 to 4.0 --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 80e314c6a..6cb05d30c 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,13 @@ endif ifeq ($(strip $(BR2_HAVE_DOT_CONFIG)),y) +# cc-option +# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586) +# sets -march=winchip-c6 if supported else falls back to -march=i586 +# without checking the latter. +cc-option = $(shell if $(TARGET_CC) $(TARGET_CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ + > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) + ############################################################# # # The list of stuff to build for the target toolchain -- cgit v1.2.3-55-g7522