summaryrefslogtreecommitdiffstats
path: root/unix/ldAix
diff options
context:
space:
mode:
authorstanton <stanton>1999-03-10 05:52:45 (GMT)
committerstanton <stanton>1999-03-10 05:52:45 (GMT)
commit0b4be24161f5971f3181adec27a32becf7cb8870 (patch)
tree92131df26a09a5f7b28f854fb7c0a62ba26cb8ac /unix/ldAix
parenta5bface5b6607af37870fc5f5ee5019f6d5fb3f1 (diff)
downloadtcl-0b4be24161f5971f3181adec27a32becf7cb8870.zip
tcl-0b4be24161f5971f3181adec27a32becf7cb8870.tar.gz
tcl-0b4be24161f5971f3181adec27a32becf7cb8870.tar.bz2
Merged stubs changes into mainline for 8.0
Diffstat (limited to 'unix/ldAix')
-rwxr-xr-xunix/ldAix14
1 files changed, 8 insertions, 6 deletions
diff --git a/unix/ldAix b/unix/ldAix
index d61ab2a..b554f9d 100755
--- a/unix/ldAix
+++ b/unix/ldAix
@@ -10,7 +10,7 @@
# symbols exported by those files, and then invokes "ldCmd" to
# perform the real link.
#
-# RCS: @(#) $Id: ldAix,v 1.2 1998/09/14 18:40:16 stanton Exp $
+# RCS: @(#) $Id: ldAix,v 1.3 1999/03/10 05:52:52 stanton Exp $
# Extract from the arguments the names of all of the object files.
@@ -23,6 +23,9 @@ for i do
fi
done
+# Extract the name of the object file that we're linking.
+outputFile=`echo $args | sed -e 's/.*-o \([^ ]*\).*/\1/'`
+
# Create the export file from all of the object files, using nm followed
# by sed editing. Here are some tricky aspects of this:
#
@@ -49,13 +52,12 @@ if test $osver -eq 3; then
nmopts="-e"
fi
rm -f lib.exp
-echo "#! " >lib.exp
+echo "#! $outputFile" >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.
+# If we're linking 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'`