summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-01-29 13:58:32 +0000
committerEric Andersen <andersen@codepoet.org>2002-01-29 13:58:32 +0000
commit5811a4e83ff42336c07a1ed740bf7e0053cf9eb0 (patch)
treedd56793ccf0e418d25a49e25e2da3fdf4a3fc312
parentde15e46e415fc67cd644c28d187b8d5fbcd6105f (diff)
Force DOPIC be true when HAVE_SHARED is true. Don't define
-D__PIC when DOPIC is true, since the compiler does that for use when -fPIC is set. Some minor formatting cleanup. -Erik
-rw-r--r--Rules.mak21
1 files changed, 12 insertions, 9 deletions
diff --git a/Rules.mak b/Rules.mak
index df86af700..9c8ab2e16 100644
--- a/Rules.mak
+++ b/Rules.mak
@@ -59,6 +59,8 @@ endif
# Some nice architecture specific optimizations
ifndef OPTIMIZATION
+
+
# use '-Os' optimization if available, else use -O2, allow Config to override
OPTIMIZATION += ${shell if $(CC) -Os -S -o /dev/null -xc /dev/null >/dev/null 2>&1; \
then echo "-Os"; else echo "-O2" ; fi}
@@ -96,19 +98,20 @@ else
endif
ifeq ($(strip $(HAVE_SHARED)),true)
+ DOPIC=true
LIBRARY_CACHE=#-DUSE_CACHE
-ifeq ($(strip $(BUILD_UCLIBC_LDSO)),true)
- LDSO=$(TOPDIR)lib/$(UCLIBC_LDSO)
- DYNAMIC_LINKER=$(SHARED_LIB_LOADER_PATH)/$(UCLIBC_LDSO)
- BUILD_DYNAMIC_LINKER=${shell cd $(TOPDIR)lib && pwd}/$(UCLIBC_LDSO)
-else
- LDSO=$(SYSTEM_LDSO)
- DYNAMIC_LINKER=/lib/$(notdir $(SYSTEM_LDSO))
- BUILD_DYNAMIC_LINKER=/lib/$(notdir $(SYSTEM_LDSO))
+ ifeq ($(strip $(BUILD_UCLIBC_LDSO)),true)
+ LDSO=$(TOPDIR)lib/$(UCLIBC_LDSO)
+ DYNAMIC_LINKER=$(SHARED_LIB_LOADER_PATH)/$(UCLIBC_LDSO)
+BUILD_DYNAMIC_LINKER=${shell cd $(TOPDIR)lib && pwd}/$(UCLIBC_LDSO)
+ else
+ LDSO=$(SYSTEM_LDSO)
+ DYNAMIC_LINKER=/lib/$(notdir $(SYSTEM_LDSO))
+ BUILD_DYNAMIC_LINKER=/lib/$(notdir $(SYSTEM_LDSO))
endif
endif
ifeq ($(strip $(DOPIC)),true)
- CFLAGS += -fPIC -D__PIC__
+ CFLAGS += -fPIC
endif
# TARGET_PREFIX is the directory under which which the uClibc runtime