From 1820d4c73b78ebe5d08921b0b6249c6f72e45215 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Tue, 4 Oct 2005 22:38:24 +0200 Subject: Make sure only supported compiler options are used Import "cc-option" shell function from kernel and use it to get the correct ARM GCC options for individual CPUs Patch by Peter Pearse, 30 Jun 2005 --- config.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'config.mk') diff --git a/config.mk b/config.mk index ff8309174..0f104398c 100644 --- a/config.mk +++ b/config.mk @@ -86,6 +86,12 @@ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer HOSTSTRIP = strip ######################################################################### +# +# Option checker (courtesy linux kernel) to ensure +# only supported compiler options are used +# +cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ + > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) # # Include the make variables (CC, etc...) -- cgit v1.2.3