head	1.2;
access;
symbols
	RELENG_2_2_8_RELEASE:1.1.1.1.2.1
	RELENG_2_2_7_RELEASE:1.1.1.1.2.1
	RELENG_2_2_6_RELEASE:1.1.1.1.2.1
	tcl8_0_p2:1.1.1.2
	RELENG_2_2_5_RELEASE:1.1.1.1.2.1
	tcl8_0:1.1.1.2
	tcl8_0_b2:1.1.1.2
	RELENG_2_2_2_RELEASE:1.1.1.1
	RELENG_2_2_1_RELEASE:1.1.1.1
	RELENG_2_2_0_RELEASE:1.1.1.1
	RELENG_2_2:1.1.1.1.0.2
	RELENG_2_2_BP:1.1.1.1
	tcl7_5_p1:1.1.1.1
	tcl7_5:1.1.1.1
	TCL:1.1.1;
locks; strict;
comment	@# @;


1.2
date	98.09.05.12.32.59;	author asami;	state dead;
branches;
next	1.1;

1.1
date	96.06.26.06.06.31;	author phk;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	96.06.26.06.06.31;	author phk;	state Exp;
branches
	1.1.1.1.2.1;
next	1.1.1.2;

1.1.1.2
date	97.07.25.19.16.26;	author phk;	state Exp;
branches;
next	;

1.1.1.1.2.1
date	97.08.21.04.12.12;	author peter;	state dead;
branches;
next	;


desc
@@


1.2
log
@Remove tcl from src/contrib.
@
text
@#!/bin/sh
#
# ldAix ldCmd ldArg ldArg ...
#
# This shell script provides a wrapper for ld under AIX in order to
# create the .exp file required for linking.  Its arguments consist
# of the name and arguments that would normally be provided to the
# ld command.  This script extracts the names of the object files
# from the argument list, creates a .exp file describing all of the
# symbols exported by those files, and then invokes "ldCmd" to
# perform the real link.
#
# SCCS: @@(#) ldAix 1.7 96/03/27 09:45:03

# Extract from the arguments the names of all of the object files.

args=$*
ofiles=""
for i do
    x=`echo $i | grep '[^.].o$'`
    if test "$x" != ""; then
	ofiles="$ofiles $i"
    fi
done

# Create the export file from all of the object files, using nm followed
# by sed editing.  Here are some tricky aspects of this:
#
# 1. Nm produces different output under AIX 4.1 than under AIX 3.2.5;
#    the following statements handle both versions.
# 2. Use the -g switch to nm instead of -e under 4.1 (this shows just
#    externals, not statics;  -g isn't available under 3.2.5, though).
# 3. Eliminate lines that end in ":": these are the names of object
#    files (relevant in 4.1 only).
# 4. Eliminate entries with the "U" key letter;  these are undefined
#    symbols (relevant in 4.1 only).
# 5. Eliminate lines that contain the string "0|extern" preceded by space;
#    in 3.2.5, these are undefined symbols (address 0).
# 6. Eliminate lines containing the "unamex" symbol.  In 3.2.5, these
#    are also undefined symbols.
# 7. If a line starts with ".", delete the leading ".", since this will
#    just cause confusion later.
# 8. Eliminate everything after the first field in a line, so that we're
#    left with just the symbol name.

nmopts="-g"
osver=`uname -v`
if test $osver -eq 3; then
  nmopts="-e"
fi
rm -f lib.exp
echo "#! " >lib.exp
/usr/ccs/bin/nm $nmopts -h $ofiles | sed -e '/:$/d' -e '/ U /d' -e '/[ 	]0|extern/d' -e '/unamex/d' -e 's/^\.//' -e 's/[ 	|].*//' | sort | uniq >>lib.exp

# Extract the name of the object file that we're linking.  If it's a .a
# file, then link all the objects together into a single file "shr.o"
# and then put that into the archive.  Otherwise link the object files
# directly into the .a file.

outputFile=`echo $args | sed -e 's/.*-o \([^ ]*\).*/\1/'`
noDotA=`echo $outputFile | sed -e '/\.a$/d'`
echo "noDotA=\"$noDotA\""
if test "$noDotA" = "" ; then
    linkArgs=`echo $args | sed -e 's/-o .*\.a /-o shr.o /'`
    echo $linkArgs
    eval $linkArgs
    echo ar cr $outputFile shr.o
    ar cr $outputFile shr.o
    rm -f shr.o
else
    eval $args
fi
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Tcl 7.5, various makefiles will be updated to use these sources as soon
as I get these back down to my machine.
@
text
@@


1.1.1.1.2.1
log
@Remove tcl since tcl7.5 is not used in 2.2, there is a binary
compatable port (ie: installing the port will enable a program
linked against libtcl75.so.* from the base to run), and this makes
2.2 compatable with -current from a ports perspective.

Reviewed by: core
@
text
@@


1.1.1.2
log
@Import TCL release 8.0 beta 2.
@
text
@d13 1
a13 1
# SCCS: @@(#) ldAix 1.8 97/02/21 14:50:27
d46 1
a46 1
nmopts="-g -C"
@
