1 # Shell script for linking C++ ToolTalk routines. We have
2 # %% (c) Copyright 1993, 1994 Hewlett-Packard Company
3 # %% (c) Copyright 1993, 1994 International Business Machines Corp.
4 # %% (c) Copyright 1993, 1994 Sun Microsystems, Inc.
5 # %% (c) Copyright 1993, 1994 Novell, Inc.
6 # %% $XConsortium: tt_ld.sh /main/4 1995/10/20 16:23:10 rswiston $
7 # to do this "by hand" to get all the compiler libraries included
8 # just once, with libC static and libc and libm dynamic.
11 # tt_ld $(CCLIBDIR) $@ $(LDFLAGS) -- $(OBJECT_FILES) $(TT_LIBS) $(TT_AUX_LIBS)
17 while test "$1" != "--"
18 do LDFLAGS="$LDFLAGS $1"
23 if test "$TARGET_SYS" = "SVR4";
25 echo $0 is not used for SVR4 based systems. Check your Makefiles and
26 echo environment variables.
29 if test "$PROF" = "gprof";
31 if ld -dc -dp -e start -X $LDFLAGS -Bstatic -o $BINARY \
32 $CCLIBDIR/gcrt0.o $CCLIBDIR/cg87/_crt1.o \
33 -L$CCLIBDIR/cg87 -L$CCLIBDIR \
35 -Bstatic -lX11 -lC -lc_p -lm >/tmp/ld.$$.4.err 2>&1
36 then $CCLIBDIR/c++filt </tmp/ld.$$.4.err
37 rm -f /tmp/ld.$$.4.err
38 $CCLIBDIR/patch $BINARY
40 else $CCLIBDIR/c++filt </tmp/ld.$$.4.err
41 rm -f /tmp/ld.$$.4.err
45 if ld -dc -dp -e start -X $LDFLAGS -o $BINARY \
46 $CCLIBDIR/crt0.o $CCLIBDIR/cg87/_crt1.o \
47 -L$CCLIBDIR/cg87 -L$CCLIBDIR \
49 -Bstatic -lC -Bdynamic -lc -lm >/tmp/ld.$$.4.err 2>&1
50 then $CCLIBDIR/c++filt </tmp/ld.$$.4.err
51 rm -f /tmp/ld.$$.4.err
52 $CCLIBDIR/patch $BINARY
54 else $CCLIBDIR/c++filt </tmp/ld.$$.4.err
55 rm -f /tmp/ld.$$.4.err