diff options
author | Eric Andersen <andersen@codepoet.org> | 2002-01-11 14:34:12 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2002-01-11 14:34:12 +0000 |
commit | 3ad09485cd9464373fe615e5495bbec4fb9fb181 (patch) | |
tree | 436531c714f2d37c688b84c3b1cea31f5fa8143f /libc/Makefile | |
parent | eba513e5693349e4f339b4162abe1fa784705aee (diff) |
Cleanup makfile, use ld to avoid chicken-and-egg problems when
building gcc/g++.
-Erik
Diffstat (limited to 'libc/Makefile')
-rw-r--r-- | libc/Makefile | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/libc/Makefile b/libc/Makefile index c8587b58d..7805f97b2 100644 --- a/libc/Makefile +++ b/libc/Makefile @@ -43,19 +43,12 @@ $(LIBNAME): subdirs shared: $(TOPDIR)lib/$(LIBNAME) @rm -rf tmp @mkdir tmp - @(cd tmp && CC=$(CC) LD=$(LD) NM=$(NM) AR=$(AR) /bin/sh ../../extra/scripts/get-needed-libgcc-objects.sh) - @if [ -s ./tmp/libgcc-need.a ] ; then \ - set -e -x; \ - $(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \ - -Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \ - ./$(LIBNAME) ./tmp/libgcc-need.a \ - $(LDSO) -Wl,--dynamic-linker,$(DYNAMIC_LINKER); \ - else \ - set -e -x; \ - $(CC) -g $(LDFLAGS) -shared -o $(SHARED_FULLNAME) \ - -Wl,-soname,$(SHARED_MAJORNAME) -Wl,--whole-archive \ - ./$(LIBNAME) $(LDSO) -Wl,-dynamic-linker,$(DYNAMIC_LINKER); \ - fi + $(AR) rv ./tmp/libgcc-need.a + @(cd tmp && CC=$(CC) LD=$(LD) NM=$(NM) AR=$(AR) \ + /bin/sh ../../extra/scripts/get-needed-libgcc-objects.sh) + $(LD) $(LDFLAGS) -o $(SHARED_FULLNAME) -soname=$(SHARED_MAJORNAME) \ + --dynamic-linker $(DYNAMIC_LINKER) --whole-archive $(LIBNAME) \ + ./tmp/libgcc-need.a @/bin/true #rm -rf tmp install -d $(TOPDIR)lib rm -f $(TOPDIR)lib/$(SHARED_FULLNAME) |