From cbc40534b73cd05f1e7800b5419495ceae4099c8 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Thu, 10 Jan 2002 15:48:11 +0000 Subject: Allow people to override the TARGET_ARCH setting --- Rules.mak | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Rules.mak') diff --git a/Rules.mak b/Rules.mak index 7dc21f35c..24ce6c229 100644 --- a/Rules.mak +++ b/Rules.mak @@ -39,9 +39,11 @@ GCCINCDIR = ${shell $(CC) -print-search-dirs | sed -ne "s/install: \(.*\)/\1incl NATIVE_ARCH = ${shell uname -m | sed -e 's/i.86/i386/' -e 's/sparc.*/sparc/' \ -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/g' \ -e 's/v850.*/v850/g'} +ifeq ($(strip $(TARGET_ARCH)),) TARGET_ARCH=${shell $(CC) -dumpmachine | sed -e s'/-.*//' -e 's/i.86/i386/' -e 's/sparc.*/sparc/' \ -e 's/arm.*/arm/g' -e 's/m68k.*/m68k/' -e 's/ppc/powerpc/g' \ -e 's/v850.*/v850/g'} +endif # Some nice architecture specific optimizations ifndef OPTIMIZATION @@ -73,6 +75,7 @@ TARGET_CCFLAGS=--uclibc-use-build-dir $(WARNINGS) $(OPTIMIZATION) $(CPUFLAGS) CFLAGS=$(ARCH_CFLAGS) $(CCFLAGS) $(DEFS) $(ARCH_CFLAGS2) TARGET_CC= $(TOPDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc TARGET_CFLAGS=$(ARCH_CFLAGS) $(TARGET_CCFLAGS) $(DEFS) $(ARCH_CFLAGS2) +NATIVE_CFLAGS=-O2 -Wall ifeq ($(strip $(DODEBUG)),true) CFLAGS += -g -- cgit v1.2.3