diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-01-23 16:04:40 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-01-23 16:04:40 +0000 |
commit | a5e190ebf33284ffe4684be1cb8a1019163d7bc8 (patch) | |
tree | 6771b4ba50e6d34877068e4c7abfe80d52fea4d0 /ldso/ldso/Makefile | |
parent | 85c0183cb45fbaee7fa0a8d8c9cb0a0a2a642d00 (diff) |
Fixup build a bit. Be sneaky and include everything into
a single .c file, making stuff be even smaller.
Diffstat (limited to 'ldso/ldso/Makefile')
-rw-r--r-- | ldso/ldso/Makefile | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/ldso/ldso/Makefile b/ldso/ldso/Makefile index 8a320c4e1..37e114b8f 100644 --- a/ldso/ldso/Makefile +++ b/ldso/ldso/Makefile @@ -29,34 +29,44 @@ include $(TOPDIR)Rules.mak LDSO_FULLNAME=ld-uClibc-$(MAJOR_VERSION).$(MINOR_VERSION).so -CFLAGS += -fPIC -D__PIC__ #XXFLAGS += #-DDL_DEBUG #-funroll-loops XXFLAGS+=-DUCLIBC_TARGET_PREFIX=\"$(TARGET_PREFIX)\" \ -DUCLIBC_DEVEL_PREFIX=\"$(DEVEL_PREFIX)\" \ -DUCLIBC_BUILD_DIR=\"$(shell cd $(TOPDIR) && pwd)\" -CSRC= ldso.c hash.c readelflib1.c $(TARGET_ARCH)/elfinterp.c +LDFLAGS=-nostdlib -shared --warn-common --export-dynamic --warn-once \ + -z combreloc --sort-common --discard-locals --discard-all +CSRC= ldso.c #hash.c readelflib1.c $(TARGET_ARCH)/elfinterp.c COBJS=$(patsubst %.c,%.o, $(CSRC)) ASRC=$(shell ls $(TARGET_ARCH)/*.S) AOBJS=$(patsubst %.S,%.o, $(ASRC)) OBJS=$(AOBJS) $(COBJS) +ifneq ($(strip $(DODEBUG)),true) +LDFLAGS+=-s +endif all: lib lib:: ldso.h $(OBJS) $(DLINK_OBJS) - $(LD) -e _dl_boot $(LDFLAGS) -nostdlib -shared -o $(LDSO_FULLNAME) \ - -soname=$(UCLIBC_LDSO) -Bstatic $(OBJS) + $(CC) -e _dl_boot $(LDFLAGS) -o $(LDSO_FULLNAME) \ + -Wl,-soname=$(UCLIBC_LDSO) $(OBJS) install -d $(TOPDIR)lib install -m 755 $(LDSO_FULLNAME) $(TOPDIR)lib (cd $(TOPDIR)lib && ln -sf $(LDSO_FULLNAME) $(UCLIBC_LDSO)) ldso.h: Makefile - echo "#define _dl_static_progname \""$(UCLIBC_LDSO)"\"" > ld-uClibc.h + echo "const char *_dl_progname=\""$(UCLIBC_LDSO)"\";" > ldso.h + echo "#include \"$(TARGET_ARCH)/elfinterp.c\"" >> ldso.h + $(COBJS): %.o : %.c $(CC) $(CFLAGS) $(XXFLAGS) -I. -I./$(TARGET_ARCH) -I../libdl -c $< -o $@ $(STRIPTOOL) -x -R .note -R .comment $*.o +$(AOBJS): %.o : %.S + $(CC) $(CFLAGS) -I. -I./$(TARGET_ARCH) -I../libdl -c $< -o $@ + $(STRIPTOOL) -x -R .note -R .comment $*.o + clean:: $(RM) -f $(UCLIBC_LDSO)* $(OBJS) $(LDSO_FULLNAME)* core *.o *.a *.s *.i ldso.h *~ |