summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
Diffstat (limited to 'ldso')
-rw-r--r--ldso/ldso/Makefile16
-rw-r--r--ldso/libdl/Makefile14
2 files changed, 14 insertions, 16 deletions
diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile
index 3c1d04530..01a26193a 100644
--- a/ldso/ldso/Makefile
+++ b/ldso/ldso/Makefile
@@ -21,20 +21,18 @@ TOPDIR=../../
include $(TOPDIR)Rules.mak
LDSO_FULLNAME=ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).$(SUBLEVEL).so
-
-XXFLAGS=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \
- -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
- -fno-builtin -nostdinc -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include
-
-ifeq ($(SUPPORT_LD_DEBUG),y)
-XXFLAGS=$(XWARNINGS) $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \
- -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
- -fno-builtin -nostdinc -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include
+XXFLAGS=$(XWARNINGS) $(LIBRARY_CACHE)
+ifeq ($(DODEBUG),y)
# Not really much point in including debugging info, since gdb
# can't really debug ldso, since gdb requires help from ldso to
# debug things....
XXFLAGS+=-Os #-g3
+else
+XXFLAGS+=$(OPTIMIZATION)
endif
+XXFLAGS+= $(XARCH_CFLAGS) $(CPU_CFLAGS) $(PICFLAG) \
+ -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
+ -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include
# BEWARE!!! At least mips* will die if -O0 is used!!!
XXFLAGS :=$(XXFLAGS:-O0=-O1)
diff --git a/ldso/libdl/Makefile b/ldso/libdl/Makefile
index b8e635b6c..9e2fb09e7 100644
--- a/ldso/libdl/Makefile
+++ b/ldso/libdl/Makefile
@@ -21,15 +21,15 @@
TOPDIR=../../
include $(TOPDIR)Rules.mak
-XXFLAGS=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) \
- -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
- -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)ldso/include -I$(TOPDIR)ldso/ldso -I. -I$(TOPDIR)include
-
+XXFLAGS=$(XWARNINGS) $(LIBRARY_CACHE)
ifeq ($(DODEBUG),y)
-XXFLAGS=$(XWARNINGS) -O0 -g3 $(XARCH_CFLAGS) $(CPU_CFLAGS) \
- -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
- -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)ldso/include -I$(TOPDIR)ldso/ldso I. -I$(TOPDIR)include
+XXFLAGS+=-O0 -g3
+else
+XXFLAGS+=$(OPTIMIZATION)
endif
+XXFLAGS+= $(XARCH_CFLAGS) $(CPU_CFLAGS) \
+ -DUCLIBC_RUNTIME_PREFIX=\"$(RUNTIME_PREFIX)\" \
+ -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)ldso/include -I$(TOPDIR)ldso/ldso -I. -I$(TOPDIR)include
XXFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install: *\(.*\)/-I\1include/gp")
XXFLAGS_NOPIC:=$(XXFLAGS)