diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-01-11 13:27:37 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-01-11 13:27:37 +0000 |
commit | 6a461519b91a521a98e0be1bf272bcdac48c6f7e (patch) | |
tree | e59f02dba9eaf3bb7bcb86444c2765b10e0a9450 | |
parent | 072938a98d1f5d454476c218a253daddfa59e2dc (diff) |
Scrub the way libraries are linked. Use ld, not gcc, to avoid
chicken-and-egg problems when building gcc toolchains.
-Erik
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | Rules.mak | 4 | ||||
-rw-r--r-- | ldso/libdl/Makefile | 5 | ||||
-rw-r--r-- | libcrypt/Makefile | 5 | ||||
-rw-r--r-- | libm/Makefile | 5 | ||||
-rw-r--r-- | libpthread/Makefile | 5 | ||||
-rw-r--r-- | libresolv/Makefile | 5 | ||||
-rw-r--r-- | libutil/Makefile | 5 |
8 files changed, 23 insertions, 16 deletions
@@ -180,8 +180,9 @@ install_dev: install -d $(PREFIX)$(DEVEL_PREFIX)/usr/lib install -d $(PREFIX)$(DEVEL_PREFIX)/include tar -chO include | tar -xC $(PREFIX)$(DEVEL_PREFIX); - chmod 755 `find $(PREFIX)$(DEVEL_PREFIX) -type d` - chmod 644 `find $(PREFIX)$(DEVEL_PREFIX)/include -name '*.h'` + -@for i in `find $(PREFIX)$(DEVEL_PREFIX) -type d` ; do \ + chmod -f 755 $$i; chmod -f 644 $$i/*.h; \ + done; (NAME=`whoami`; chown -R $$NAME.$$NAME $(PREFIX)$(DEVEL_PREFIX)) ifeq ($(strip $(HAVE_SHARED)),true) find lib/ -type l -name '*.so' -exec cp -a {} $(PREFIX)$(DEVEL_PREFIX)/lib ';' @@ -80,13 +80,13 @@ NATIVE_CFLAGS=-O2 -Wall ifeq ($(strip $(DODEBUG)),true) CFLAGS += -g TARGET_CFLAGS += -g - LDFLAGS = -nostdlib -Wl,-warn-common + LDFLAGS = -shared -nostdlib --warn-common --warn-once -z combreloc TARGET_LDFLAGS = --uclibc-use-build-dir -Wl,-warn-common STRIPTOOL = /bin/true -Since_we_are_debugging else CFLAGS += -DNDEBUG #-fomit-frame-pointer TARGET_CFLAGS += -DNDEBUG #-fomit-frame-pointer - LDFLAGS = -s -nostdlib -Wl,-warn-common + LDFLAGS = -s -shared -nostdlib --warn-common --warn-once -z combreloc TARGET_LDFLAGS = --uclibc-use-build-dir -s -Wl,-warn-common endif ifeq ($(strip $(DOPIC)),true) diff --git a/ldso/libdl/Makefile b/ldso/libdl/Makefile index faaced6c0..cccd9e473 100644 --- a/ldso/libdl/Makefile +++ b/ldso/libdl/Makefile @@ -50,8 +50,9 @@ $(OBJS): %.o : %.c $(OBJ): Makefile shared: all - $(TARGET_CC) $(TARGET_LDFLAGS) -nostdlib -shared -o $(LIBDL_SHARED_FULLNAME) \ - -Wl,-soname,$(LIBDL_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive $(LIBDL) -lc + $(LD) $(LDFLAGS) -o $(LIBDL_SHARED_FULLNAME) \ + -soname=$(LIBDL_SHARED).$(MAJOR_VERSION) \ + --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/libcrypt/Makefile b/libcrypt/Makefile index 4d6354b73..8d72741ef 100644 --- a/libcrypt/Makefile +++ b/libcrypt/Makefile @@ -48,8 +48,9 @@ $(OBJS): %.o : %.c $(OBJ): Makefile shared: all - $(TARGET_CC) $(TARGET_LDFLAGS) -nostdlib -shared -o $(LIBCRYPT_SHARED_FULLNAME) \ - -Wl,-soname,$(LIBCRYPT_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive $(LIBCRYPT) -lc + $(LD) $(LDFLAGS) -o $(LIBCRYPT_SHARED_FULLNAME) \ + -soname=$(LIBCRYPT_SHARED).$(MAJOR_VERSION) \ + --whole-archive $(LIBCRYPT); install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBCRYPT_SHARED).$(MAJOR_VERSION) install -m 644 $(LIBCRYPT_SHARED_FULLNAME) $(TOPDIR)lib; diff --git a/libm/Makefile b/libm/Makefile index bc5d857c4..51d7be8f7 100644 --- a/libm/Makefile +++ b/libm/Makefile @@ -94,8 +94,9 @@ $(LIBM): ar-target shared: all @if [ -f $(LIBM) ] ; then \ set -x -e; \ - $(TARGET_CC) $(TARGET_LDFLAGS) -nostdlib -shared -o $(LIBM_SHARED_FULLNAME) \ - -Wl,-soname,$(LIBM_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive $(LIBM) -lc; \ + $(LD) $(LDFLAGS) -o $(LIBM_SHARED_FULLNAME) \ + -soname=$(LIBM_SHARED).$(MAJOR_VERSION) \ + --whole-archive $(LIBM); \ install -d $(TOPDIR)lib; \ rm -f $(TOPDIR)lib/$(LIBM_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBM_SHARED).$(MAJOR_VERSION); \ install -m 644 $(LIBM_SHARED_FULLNAME) $(TOPDIR)lib; \ diff --git a/libpthread/Makefile b/libpthread/Makefile index f844ee82a..fa6e0e371 100644 --- a/libpthread/Makefile +++ b/libpthread/Makefile @@ -48,8 +48,9 @@ $(OBJS): %.o : %.c $(OBJ): Makefile shared: all - $(TARGET_CC) $(TARGET_LDFLAGS) -nostdlib -shared -o $(LIBPTHREAD_SHARED_FULLNAME) \ - -Wl,-soname,$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive $(LIBPTHREAD) -lc + $(LD) $(LDFLAGS) -o $(LIBPTHREAD_SHARED_FULLNAME) \ + -soname=$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) \ + --whole-archive $(LIBPTHREAD); install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(LIBPTHREAD_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBPTHREAD_SHARED).$(MAJOR_VERSION) install -m 644 $(LIBPTHREAD_SHARED_FULLNAME) $(TOPDIR)lib; diff --git a/libresolv/Makefile b/libresolv/Makefile index 44b02b58a..c494afc17 100644 --- a/libresolv/Makefile +++ b/libresolv/Makefile @@ -49,8 +49,9 @@ $(OBJS): %.o : %.c $(OBJ): Makefile shared: all - $(TARGET_CC) $(TARGET_LDFLAGS) -nostdlib -shared -o $(LIBRESOLV_SHARED_FULLNAME) \ - -Wl,-soname,$(LIBRESOLV_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive $(LIBRESOLV) -lc + $(LD) $(LDFLAGS) -o $(LIBRESOLV_SHARED_FULLNAME) \ + -soname=$(LIBRESOLV_SHARED).$(MAJOR_VERSION) \ + --whole-archive $(LIBRESOLV); install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(LIBRESOLV_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBRESOLV_SHARED).$(MAJOR_VERSION) install -m 644 $(LIBRESOLV_SHARED_FULLNAME) $(TOPDIR)lib; diff --git a/libutil/Makefile b/libutil/Makefile index 705f89fa1..f86f7c8f5 100644 --- a/libutil/Makefile +++ b/libutil/Makefile @@ -50,8 +50,9 @@ $(OBJS): %.o : %.c $(STRIPTOOL) -x -R .note -R .comment $*.o shared: all - $(TARGET_CC) $(TARGET_LDFLAGS) -nostdlib -shared -o $(LIBUTIL_SHARED_FULLNAME) \ - -Wl,-soname,$(LIBUTIL_SHARED).$(MAJOR_VERSION) -Wl,--whole-archive $(LIBUTIL) -lc + $(LD) $(LDFLAGS) -o $(LIBUTIL_SHARED_FULLNAME) \ + -soname=$(LIBUTIL_SHARED).$(MAJOR_VERSION) \ + --whole-archive $(LIBUTIL); install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib/$(LIBUTIL_SHARED).$(MAJOR_VERSION) install -m 644 $(LIBUTIL_SHARED_FULLNAME) $(TOPDIR)lib/; |