summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-11-19 07:11:27 +0000
committerEric Andersen <andersen@codepoet.org>2002-11-19 07:11:27 +0000
commit98fd3d6c507aa88304dea4c49a9d6c179399d427 (patch)
tree35fba2b1cee733bdfb025782f2682854843a159f
parent336849ea6e8dc302f7e77aeabadd8961f9666bfb (diff)
Remove use of $(strip) when no longer needed. Fixup DODEBUG
so when debugging is enabled we don't enable all the major optimizations. -Erik
-rw-r--r--Rules.mak26
1 files 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