+Wed Jul 23 08:18:19 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * ltconfig.in (pic_flag): According to the libg++ 2.7.2 configure
+ script, DEC alpha CPUs are PIC-only, as well. Reported by Kevin
+ Jacobs.
+
Mon Jul 21 09:46:02 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+ * ltconfig.in, ltmain.sh.in: Replace all occurances of "sed 'X;
+ Y'" with "sed -e 'X' -e 'Y'".
+
* ltmain.sh.in (link): Finish full integration for `-dlopen' and
`-dlpreopen'.
+
Fix two silly typos where I used a compile_command in place of a
finalize_command, and vice versa.
+
Change the wrapper script to check a hardcoded path only if the
argv[0] method fails. This is a compromise for the previous two
patches, and should solve the majority of problems with wrapper
scripts. From Kenneth Albanowski.
+ (link): Change a reference to hardcode_libdir_colon_separated to
+ use the new hardcode_libdir_separator variable.
+
* demo/Makefile.am (helldl_LDFLAGS): Add `-export-dynamic' and
`-dlpreopen' for building helldl.
case "$host_os" in
aix3* | aix4*)
# FIXME All rs/6000 code is PIC, but is there any non-rs/6000 AIX platform?
- pic_flag=
link_static_flag='-bnso -bI:/lib/syscalls.exp'
;;
fi
case "$host_cpu" in
-rs6000 | powerpc | powerpcle)
+alpha | rs6000 | powerpc | powerpcle)
# Yippee! All RS/6000 and PowerPC code is position-independent.
+ # Apparently, so is DEC alpha!
pic_flag=
;;
esac
# This is a sane default that works on at least a few old systems.
# [It comes from Ultrix. What could be older than Ultrix?!! ;)]
-global_symbol_pipe="sed '/^.* [BCDEGRSTU] /!d; s/^.* [BCDEGRSTU] \(.*\)$/\1 \1/'"
+global_symbol_pipe="sed -e '/^.* [BCDEGRSTU] /!d' -e 's/^.* [BCDEGRSTU] \(.*\)$/\1 \1/'"
# Take a first stab at what the pipe should be.
if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
# We're using GNU nm.
- global_symbol_pipe="sed '/^.* [ABCDGISTU] /!d; s/^.* [ABCDGISTU] \(.*\)$/\1 \1/'"
+ global_symbol_pipe="sed -e '/^.* [ABCDGISTU] /!d' -e 's/^.* [ABCDGISTU] \(.*\)$/\1 \1/'"
else
# It's the system nm.
case "$host_os" in
aix*)
# Delete symbols that begin with a dot.
- global_symbol_pipe="sed '/^.* [BCDTU] [^.]/!d; s/^.* [BCDTU] \(.*\)$/\1 \1/'"
+ global_symbol_pipe="sed -e '/^.* [BCDTU] [^.]/!d' -e 's/^.* [BCDTU] \(.*\)$/\1 \1/'"
;;
solaris2*)
- global_symbol_pipe="sed '/^.* [BDTU] /!d; s/^.* [BDTU] \(.*\)$/\1 \1/'"
+ global_symbol_pipe="sed -e '/^.* [BDTU] /!d' -e 's/^.* [BDTU] \(.*\)$/\1 \1/'"
;;
esac
fi
fi
# Find the relevant object directory and library name.
- name=`echo "$arg" | sed 's%^.*/%%; s/\.la$//; s/^lib//'`
+ name=`echo "$arg" | sed -e 's%^.*/%%' -e 's/\.la$//' -e 's/^lib//'`
dir=`echo "$arg" | sed 's%/[^/]*$%%'`
if test "$dir" = "$arg"; then
dir="$objdir"
fi
# Substitute the hardcoded libdirs into the compile commands.
- if test "$hardcode_libdir_colon_separated" = yes; then
+ if test -n "$hardcode_libdir_separator"; then
compile_command=`echo "$compile_command" | sed "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
finalize_command=`echo "$finalize_command" | sed "s%@HARDCODE_LIBDIRS@%$hardcode_libdirs%g"`
fi
done
# Use standard objects if they are PIC.
- test -z "$pic_flag" && libobjs=`echo "$libobjs " | sed 's/\.lo /.o /g; s/ $//g'`
+ test -z "$pic_flag" && libobjs=`echo "$libobjs " | sed -e 's/\.lo /.o /g' -e 's/ $//g'`
# Do each of the archive commands.
cmds=`eval echo \"$archive_cmds\"`
$run $rm $obj $libobj
# Create the old-style object.
- reload_objs="$objs"`echo "$libobjs " | sed 's/[^ ]*\.a //g; s/\.lo /.o /g; s/ $//g'`
+ reload_objs="$objs"`echo "$libobjs " | sed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
output="$obj"
cmds=`eval echo \"$reload_cmds\"`
if test -n "$libobjs"; then
# Transform all the library objects into standard objects.
- compile_command=`echo "$compile_command " | sed 's/\.lo /.o /g; s/ $//'`
- finalize_command=`echo "$finalize_command " | sed 's/\.lo /.o /g; s/ $//'`
+ compile_command=`echo "$compile_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
+ finalize_command=`echo "$finalize_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
fi
if test "$export_dynamic" = yes && test -n "$global_symbol_pipe" && test -n "$NM"; then
# Add our own program objects to the preloaded list.
- dlprefiles=`echo "$objs$libobjs$dlprefiles " | sed 's/\.lo /.o/g; s/ $//'`
+ dlprefiles=`echo "$objs$libobjs$dlprefiles " | sed -e 's/\.lo /.o/g' -e 's/ $//'`
# Discover the nlist of each of the dlfiles.
dlsyms="$objdir/${output}S.c"
EOF
if test -f "$nlist"; then
# Prevent the only kind of circular reference mistake we can make.
- sed '/ dld_preloaded_symbols$/d; s/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$dlsyms"
+ sed -e '/ dld_preloaded_symbols$/d' -e 's/^.* \(.*\)$/extern char \1;/' < "$nlist" >> "$dlsyms"
else
echo "/* NONE */" >> "$dlsyms"
fi
elif test "$export_dynamic" != yes; then
test -n "$dlfiles$dlprefiles" && echo "$progname: warning: \`-dlopen' and \`-dlpreopen' are ignored without \`-export-dynamic'" 1>&2
else
+ # We keep going just in case the user didn't refer to
+ # dld_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
echo "$progname: not configured to extract global symbols from dlpreopened files" 1>&2
# Nullify the symbol file.
# If we failed to link statically, then try again.
if test $status -ne 0 && test -n "$link_static"; then
echo "$progname: cannot link \`$output' statically; retrying semi-dynamically" 1>&2
- compile_command=`echo "$compile_command " | sed "s% $link_static % %;s/ $//"`
+ compile_command=`echo "$compile_command " | sed -e "s% $link_static % %" -e 's/ $//'`
$show "$compile_command"
$run $compile_command
status=$?
oldlib="$objdir/$libname.a"
# Transform .lo files to .o files.
- oldobjs="$objs"`echo "$libobjs " | sed 's/[^ ]*\.a //g; s/\.lo /.o /g; s/ $//g'`
+ oldobjs="$objs"`echo "$libobjs " | sed -e 's/[^ ]*\.a //g' -e 's/\.lo /.o /g' -e 's/ $//g'`
if test -d "$objdir"; then
$show "$rm $oldlib"
if test -n "$destname"; then
destfile="$destdir/$destname"
else
- destfile=`echo "$file" | sed 's%^.*/%%;'`
+ destfile=`echo "$file" | sed 's%^.*/%%'`
destfile="$destdir/$destfile"
fi
# Deduce the name of the destination old-style object file.
case "$destfile" in
*.lo)
- staticdest=`echo "$destfile" | sed 's/\.lo$/\.o/;'`
+ staticdest=`echo "$destfile" | sed 's/\.lo$/\.o/'`
;;
*.o)
staticdest="$destfile"
# Install the old object if enabled.
if test "$build_old_libs" = yes; then
# Deduce the name of the old-style object file.
- staticobj=`echo "$file" | sed 's/\.lo$/\.o/;'`
+ staticobj=`echo "$file" | sed 's/\.lo$/\.o/'`
$show "$install_prog $staticobj $staticdest"
$run $install_prog $staticobj $staticdest || exit $?