From 98fd3d6c507aa88304dea4c49a9d6c179399d427 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Tue, 19 Nov 2002 07:11:27 +0000 Subject: Remove use of $(strip) when no longer needed. Fixup DODEBUG so when debugging is enabled we don't enable all the major optimizations. -Erik --- Rules.mak | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Rules.mak b/Rules.mak index f1930900f..70c49bd60 100644 --- a/Rules.mak +++ b/Rules.mak @@ -153,6 +153,15 @@ endif # Add a bunch of extra pedantic annoyingly strict checks WARNINGS+=-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing +ifeq ($(DODEBUG),y) + CFLAGS += -g + LDFLAGS:= $(CPU_LDFLAGS-y) -shared --warn-common --warn-once -z combreloc + STRIPTOOL:= true -Since_we_are_debugging + OPTIMIZATION=$(call check_gcc,-Os,-O2) +else + LDFLAGS := $(CPU_LDFLAGS-y) -s -shared --warn-common --warn-once -z combreloc +endif + # Some nice CFLAGS to work with CFLAGS:=$(WARNINGS) $(OPTIMIZATION) -fno-builtin -nostdinc $(CPUFLAGS) \ -D_LIBC $(CPU_CFLAGS-y) $(ARCH_CFLAGS) -I$(TOPDIR)include -I. @@ -162,20 +171,13 @@ CFLAGS:=$(WARNINGS) $(OPTIMIZATION) -fno-builtin -nostdinc $(CPUFLAGS) \ CFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install: *\(.*\)/-I\1include/gp") -ifeq ($(strip $(DODEBUG)),y) - CFLAGS += -g - LDFLAGS:= $(CPU_LDFLAGS-y) -shared --warn-common --warn-once -z combreloc - STRIPTOOL:= true -Since_we_are_debugging -else - LDFLAGS := $(CPU_LDFLAGS-y) -s -shared --warn-common --warn-once -z combreloc -endif -ifneq ($(strip $(DOASSERTS)),y) +ifneq ($(DOASSERTS),y) CFLAGS += -DNDEBUG endif -ifeq ($(strip $(HAVE_SHARED)),y) +ifeq ($(HAVE_SHARED),y) LIBRARY_CACHE:=#-DUSE_CACHE - ifeq ($(strip $(BUILD_UCLIBC_LDSO)),y) + ifeq ($(BUILD_UCLIBC_LDSO),y) LDSO:=$(TOPDIR)lib/$(UCLIBC_LDSO) DYNAMIC_LINKER:=$(SHARED_LIB_LOADER_PATH)/$(UCLIBC_LDSO) BUILD_DYNAMIC_LINKER:=$(shell cd $(TOPDIR) && pwd)/lib/$(UCLIBC_LDSO) @@ -185,10 +187,10 @@ ifeq ($(strip $(HAVE_SHARED)),y) BUILD_DYNAMIC_LINKER:=/lib/$(notdir $(SYSTEM_LDSO)) endif endif -ifeq ($(strip $(DOPIC)),y) +ifeq ($(DOPIC),y) CFLAGS += -fPIC endif -ifeq ($(strip $(UCLIBC_HAS_SOFT_FLOAT)),y) +ifeq ($(UCLIBC_HAS_SOFT_FLOAT),y) CFLAGS += $(call check_gcc,-msoft-float,) endif -- cgit v1.2.3