From afb1cd9b2c8cfcf305c1920b45de54b3e78da32a Mon Sep 17 00:00:00 2001 From: Tobias Anderberg Date: Thu, 5 Dec 2002 17:37:44 +0000 Subject: Added CPU_CFLAGS and CPU_LDFLAGS for cris. Added additional CFLAGS for cris when compiling with PIC. --- Rules.mak | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Rules.mak b/Rules.mak index abe7696f2..11c82e8ac 100644 --- a/Rules.mak +++ b/Rules.mak @@ -155,6 +155,11 @@ ifeq ($(strip $(TARGET_ARCH)),h8300) CPU_CFLAGS-y+=-mh -mint32 -fsigned-char endif +ifeq ($(strip $(TARGET_ARCH)),cris) + CPU_LDFLAGS-$(CONFIG_CRIS):="-mcrislinux" + CPU_CFLAGS-$(CONFIG_CRIS):="-mlinux" +endif + # Override optimization settings when debugging ifeq ($(DODEBUG),y) OPTIMIZATION=$(call check_gcc,-Os,-O2) @@ -179,7 +184,6 @@ endif #CFLAGS+=-iwithprefix include CFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install: *\(.*\)/-I\1include/gp") - ifneq ($(DOASSERTS),y) CFLAGS += -DNDEBUG endif @@ -196,9 +200,15 @@ ifeq ($(HAVE_SHARED),y) BUILD_DYNAMIC_LINKER:=/lib/$(notdir $(SYSTEM_LDSO)) endif endif + ifeq ($(DOPIC),y) +ifeq ($(strip $(TARGET_ARCH)),cris) + CFLAGS += -fpic -mlinux +else CFLAGS += -fPIC endif +endif + ifeq ($(UCLIBC_HAS_SOFT_FLOAT),y) CFLAGS += $(call check_gcc,-msoft-float,) endif -- cgit v1.2.3