summaryrefslogtreecommitdiff
path: root/ldso
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-06-15 19:47:58 +0000
committerEric Andersen <andersen@codepoet.org>2001-06-15 19:47:58 +0000
commitec4e85f8a3471efaf67032d8b7cedc13d40b1446 (patch)
treef7a341d1870ecc5f3e3487a37fb55d9efe177c9a /ldso
parentc1ae0ad8262ce40178a54a393bcf466b57ad5819 (diff)
Be consistant for all the client code, and use TARGET_CC with --uclibc-use-build-dir
Diffstat (limited to 'ldso')
-rw-r--r--ldso/libdl/Makefile10
-rw-r--r--ldso/util/Makefile15
2 files changed, 10 insertions, 15 deletions
diff --git a/ldso/libdl/Makefile b/ldso/libdl/Makefile
index f52027250..840fad764 100644
--- a/ldso/libdl/Makefile
+++ b/ldso/libdl/Makefile
@@ -27,12 +27,11 @@ include $(TOPDIR)Rules.mak
LIBDL=libdl.a
LIBDL_SHARED=libdl.so
LIBDL_SHARED_FULLNAME=libdl-$(MAJOR_VERSION).$(MINOR_VERSION).so
-TARGET_CC= $(TOPDIR)extra/gcc-uClibc/$(TARGET_ARCH)-uclibc-gcc
CSRC= dlib.c
OBJS=$(patsubst %.c,%.o, $(CSRC))
-CFLAGS += --uclibc-use-build-dir -DUSE_CACHE #-fPIC -D__PIC__ #-funroll-loops
+TARGET_CFLAGS += -DUSE_CACHE #-fPIC -D__PIC__ #-funroll-loops
all: $(OBJS) $(LIBDL) shared
@@ -45,15 +44,14 @@ ar-target: $(OBJS)
#install -m 644 $(LIBDL) $(TOPDIR)lib
$(OBJS): %.o : %.c
- $(TARGET_CC) -I../d-link -I../d-link/$(TARGET_ARCH) $(CFLAGS) -c $< -o $@
+ $(TARGET_CC) -I../d-link -I../d-link/$(TARGET_ARCH) $(TARGET_CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
$(OBJ): Makefile
shared: all
- $(TARGET_CC) $(LDFLAGS) -shared -o $(LIBDL_SHARED_FULLNAME) \
- -Wl,-soname,$(LIBDL_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive \
- $(LIBDL) $(TOPDIR)lib/$(SHARED_FULLNAME)
+ $(TARGET_CC) $(TARGET_LDFLAGS) -nostdlib -shared -o $(LIBDL_SHARED_FULLNAME) \
+ -Wl,-soname,$(LIBDL_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive $(LIBDL)
install -d $(TOPDIR)lib
rm -f $(TOPDIR)lib/$(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBDL_SHARED).$(MAJOR_VERSION)
install -m 644 $(LIBDL_SHARED_FULLNAME) $(TOPDIR)lib;
diff --git a/ldso/util/Makefile b/ldso/util/Makefile
index f2486fdaa..cb5cfea34 100644
--- a/ldso/util/Makefile
+++ b/ldso/util/Makefile
@@ -1,32 +1,29 @@
TOPDIR=../../
include $(TOPDIR)Rules.mak
-CFLAGS=-Wall -Os -I. --uclibc-use-build-dir
-CC = $(TOPDIR)extra/gcc-uClibc/$(NATIVE_ARCH)-uclibc-gcc
-
all: ldconfig ldd readelf
readsoname.o: readsoname.c readsoname2.c
- $(CC) $(CFLAGS) -c $< -o $@
+ $(TARGET_CC) $(TARGET_CFLAGS) -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
ldconfig.o: ldconfig.c
- $(CC) $(CFLAGS) -DUCLIBC_ROOT_DIR=\"$(ROOT_DIR)\" -c $< -o $@
+ $(TARGET_CC) $(TARGET_CFLAGS) -DUCLIBC_ROOT_DIR=\"$(ROOT_DIR)\" -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
ldd.o: ldd.c
- $(CC) $(CFLAGS) -DUCLIBC_ROOT_DIR=\"$(ROOT_DIR)\" \
+ $(TARGET_CC) $(TARGET_CFLAGS) -DUCLIBC_ROOT_DIR=\"$(ROOT_DIR)\" \
-DLDSO_ADDR="0x62f00020" -c $< -o $@
$(STRIPTOOL) -x -R .note -R .comment $*.o
readelf: readelf.c
- $(CC) $(CFLAGS) readelf.c -o $@
+ $(TARGET_CC) $(TARGET_CFLAGS) readelf.c -o $@
ldconfig: ldconfig.o readsoname.o
- $(CC) $(CFLAGS) -static $^ -o $@
+ $(TARGET_CC) $(TARGET_CFLAGS) -static $^ -o $@
ldd: ldd.o readsoname.o
- $(CC) $(CFLAGS) $^ -o $@
+ $(TARGET_CC) $(TARGET_CFLAGS) $^ -o $@
clean:
rm -f ldconfig ldd readelf *.o *~ core