From 4775ec645660e93078e0da837d63b01a2f41c081 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 4 Nov 2002 20:49:54 +0000 Subject: Fixup so we use soft-float when HAS_FPU is disabled. -Erik --- Rules.mak | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'Rules.mak') diff --git a/Rules.mak b/Rules.mak index 9154a9aa1..cb0ed31aa 100644 --- a/Rules.mak +++ b/Rules.mak @@ -34,6 +34,7 @@ STRIPTOOL = $(CROSS)strip # Select the compiler needed to build binaries for your development system NATIVE_CC = gcc +NATIVE_CFLAGS:=-O2 -Wall # Be sure to update include/features.h when changing this... @@ -138,10 +139,14 @@ endif # Add a bunch of extra pedantic annoyingly strict checks WARNINGS+=-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing - +# Some nice CFLAGS to work with CFLAGS:=$(WARNINGS) $(OPTIMIZATION) -fno-builtin -nostdinc $(CPUFLAGS) \ - -I$(TOPDIR)include -iwithprefix include -I. -D_LIBC $(CPU_CFLAGS-y) $(ARCH_CFLAGS) -NATIVE_CFLAGS:=-O2 -Wall + -D_LIBC $(CPU_CFLAGS-y) $(ARCH_CFLAGS) -I$(TOPDIR)include -I. + +# Sigh, some stupid versions of gcc can't seem to cope with '-iwithprefix include' +#CFLAGS+=-iwithprefix include +CFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install:\(.*\)/\1include/gp") + ifeq ($(strip $(DODEBUG)),y) CFLAGS += -g @@ -167,6 +172,9 @@ endif ifeq ($(strip $(DOPIC)),y) CFLAGS += -fPIC endif +ifeq ($(strip $(HAS_FPU)),n) + CFLAGS += -msoft-float +endif # TARGET_PREFIX is the directory under which which the uClibc runtime # environment will be installed and used on the target system. The -- cgit v1.2.3