summaryrefslogtreecommitdiff
path: root/ldso/libdl/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'ldso/libdl/Makefile')
-rw-r--r--ldso/libdl/Makefile15
1 files changed, 11 insertions, 4 deletions
diff --git a/ldso/libdl/Makefile b/ldso/libdl/Makefile
index 1ac194400..12461d77e 100644
--- a/ldso/libdl/Makefile
+++ b/ldso/libdl/Makefile
@@ -21,9 +21,16 @@
TOPDIR=../../
include $(TOPDIR)Rules.mak
-XXFLAGS+=-DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
+XXFLAGS=$(XWARNINGS) $(OPTIMIZATION) $(XARCH_CFLAGS) $(CPU_CFLAGS) \
+ -DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \
-DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \
- -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\"
+ -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" \
+ -fno-builtin -nostdinc -D_LIBC -I$(TOPDIR)ldso/include -I. -I$(TOPDIR)include
+XXFLAGS+=$(shell $(CC) -print-search-dirs | sed -ne "s/install: *\(.*\)/-I\1include/gp")
+XXFLAGS_NOPIC:=$(XXFLAGS)
+ifeq ($(DOPIC),y)
+ XXFLAGS += $(PICFLAG)
+endif
ifeq ($(strip $(SUPPORT_LD_DEBUG)),y)
XXFLAGS+=-D__SUPPORT_LD_DEBUG__
endif
@@ -50,11 +57,11 @@ ar-target: $(OBJS) $(PIC_OBJS)
dlib.o: dlib.c
- $(CC) -I../ldso -I../ldso/$(TARGET_ARCH) $(CFLAGS_NOPIC) $(XXFLAGS) -c dlib.c -o dlib.o
+ $(CC) $(XXFLAGS_NOPIC) -c dlib.c -o dlib.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
dlib_pic.o: dlib.c
- $(CC) -I../ldso -I../ldso/$(TARGET_ARCH) $(CFLAGS) $(XXFLAGS) -c dlib.c -o dlib_pic.o
+ $(CC) $(XXFLAGS) -c dlib.c -o dlib_pic.o
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(OBJ): Makefile