Commit aefa45d3 by Richard Henderson Committed by Richard Henderson

Makefile.in (libgcc.mk): Pass SHLIB_EXT, not SHLIB_LIBS.

        * Makefile.in (libgcc.mk): Pass SHLIB_EXT, not SHLIB_LIBS.
        * configure.in (sparc*-*-solaris*): Use t-slibgcc{,-sld}.
        * mklibgcc.in: Consider SHLIB_LINK the entire shlib build command.
        Use SHLIB_EXT.

        * config/t-linux (SHLIB_EXT): New.
        (SHLIB_LINK): Use the entire build command, with substitutions.
        (SHLIB_LIBS): Remove.
        * config/alpha/t-osf4: Likewise.
        * config/mips/t-iris6: Likewise.
        * config/sparc/t-sol2: Likewise, but move shlib stuff...
        * config/sparc/t-slibgcc-sld: ...here.
        * config/sparc/t-slibgcc: New file.

From-SVN: r36792
parent b15ad712
2000-10-08 Richard Henderson <rth@cygnus.com>
* Makefile.in (libgcc.mk): Pass SHLIB_EXT, not SHLIB_LIBS.
* configure.in (sparc*-*-solaris*): Use t-slibgcc{,-sld}.
* mklibgcc.in: Consider SHLIB_LINK the entire shlib build command.
Use SHLIB_EXT.
* config/t-linux (SHLIB_EXT): New.
(SHLIB_LINK): Use the entire build command, with substitutions.
(SHLIB_LIBS): Remove.
* config/alpha/t-osf4: Likewise.
* config/mips/t-iris6: Likewise.
* config/sparc/t-sol2: Likewise, but move shlib stuff...
* config/sparc/t-slibgcc-sld: ...here.
* config/sparc/t-slibgcc: New file.
2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
* tm.texi (INTMAX_TYPE, UINTMAX_TYPE): Define.
......
......@@ -980,7 +980,7 @@ libgcc.mk: config.status Makefile mklibgcc $(LIB2ADD) xgcc$(exeext)
MULTILIBS=`$(GCC_FOR_TARGET) --print-multi-lib` \
EXTRA_MULTILIB_PARTS='$(EXTRA_MULTILIB_PARTS)' \
SHLIB_LINK='$(SHLIB_LINK)' \
SHLIB_LIBS='$(SHLIB_LIBS)' \
SHLIB_EXT='$(SHLIB_EXT)' \
SHLIB_MULTILIB='$(SHLIB_MULTILIB)' \
SHLIB_MKMAP='$(SHLIB_MKMAP)' \
SHLIB_MAPFILES='$(SHLIB_MAPFILES)' \
......
......@@ -5,6 +5,7 @@ CRTSTUFF_T_CFLAGS_S = -fPIC
TARGET_LIBGCC2_CFLAGS = -fPIC
# Build a shared libgcc library.
SHLIB_EXT = .so
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,-msym -Wl,-set_version,gcc.3 -Wl,-soname,@shlib_base_name@.so.0
SHLIB_LIBS = -lc
-Wl,-msym -Wl,-set_version,gcc.0 -Wl,-soname,@shlib_base_name@.so.0 \
-o @shlib_base_name@.so @multilib_flags@ @shlib_objs@ -lc
......@@ -20,12 +20,13 @@ EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o
CRTSTUFF_T_CFLAGS=-g1
# Build a shared libgcc library.
SHLIB_EXT = .so
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,-soname,@shlib_base_name@.so.0
-Wl,-soname,@shlib_base_name@.so.0 \
-o @shlib_base_name@.so @multilib_flags@ @shlib_objs@ -lc
# ??? Irix 6.5 seems to eat the option fine (if we somehow remove the
# -hidden_symbol option, which is documented to be ignored in conjunction
# with -exports_file), but fails to actually hide any symbols.
# -Wl,-exports_file,libgcc.map
SHLIB_LIBS = -lc
# -Wl,-exports_file,@shlib_map_file@
SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
# Build a shared libgcc library with the GNU linker.
SHLIB_EXT = .so
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,--soname=@shlib_base_name@.so.0 \
-Wl,--version-script=@shlib_map_file@ \
-o @shlib_base_name@.so @multilib_flags@ @shlib_objs@ -lc
SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
# Build a shared libgcc library with the Solaris linker.
SHLIB_EXT = .so
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,-h,@shlib_base_name@.so.0 -Wl,-z,text -Wl,-z,defs \
-Wl,-M,@shlib_map_file@ -o @shlib_base_name@.so \
@multilib_flags@ @shlib_objs@ -lc
SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
......@@ -28,11 +28,3 @@ $(T)gcrt1.o: $(srcdir)/config/sparc/sol2-c1.asm $(GCC_PASSES)
CRTSTUFF_T_CFLAGS = -fPIC
TARGET_LIBGCC2_CFLAGS = -fPIC
# Build a shared libgcc library.
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,-h,@shlib_base_name@.so.0 -Wl,-z,text -Wl,-z,defs \
-Wl,-M,libgcc.map
SHLIB_LIBS = -lc
SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
......@@ -9,10 +9,11 @@ CRTSTUFF_T_CFLAGS_S = -fPIC
# Compile libgcc2.a with pic.
TARGET_LIBGCC2_CFLAGS = -fPIC
# Build a shared libgcc library.
SHLIB_EXT = .so
SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
-Wl,--soname=@shlib_base_name@.so.0 \
-Wl,--version-script=libgcc.map
SHLIB_LIBS = -lc
-Wl,--version-script=@shlib_map_file@ \
-o @shlib_base_name@.so @multilib_flags@ @shlib_objs@ -lc
SHLIB_MKMAP = $(srcdir)/mkmap-symver.awk
SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver $(srcdir)/config/libgcc-glibc.ver
......
......@@ -3486,6 +3486,11 @@ changequote([,])dnl
xm_file="sparc/xm-sysv4-64.h sparc/xm-sol2.h"
xm_defines="USG POSIX"
tmake_file="sparc/t-sol2 sparc/t-sol2-64"
if test x$gnu_ld = xyes; then
tmake_file="$tmake_file sparc/t-slibgcc"
else
tmake_file="$tmake_file sparc/t-slibgcc-sld"
fi
xmake_file=sparc/x-sysv4
extra_parts="crt1.o crti.o crtn.o gcrt1.o crtbegin.o crtend.o"
float_format=none
......@@ -3508,6 +3513,11 @@ changequote([,])dnl
xm_defines="USG POSIX"
tm_file="sparc/sol2.h sparc/hal.h"
tmake_file="sparc/t-halos sparc/t-sol2"
if test x$gnu_ld = xyes; then
tmake_file="$tmake_file sparc/t-slibgcc"
else
tmake_file="$tmake_file sparc/t-slibgcc-sld"
fi
xmake_file=sparc/x-sysv4
extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
case $machine in
......@@ -3532,6 +3542,11 @@ changequote([,])dnl
xm_file="sparc/xm-sysv4.h sparc/xm-sol2.h"
xm_defines="USG POSIX"
tmake_file=sparc/t-sol2
if test x$gnu_ld = xyes; then
tmake_file="$tmake_file sparc/t-slibgcc"
else
tmake_file="$tmake_file sparc/t-slibgcc-sld"
fi
xmake_file=sparc/x-sysv4
extra_parts="crt1.o crti.o crtn.o gcrt1.o gmon.o crtbegin.o crtend.o"
# At the moment, 32-to-64 cross compilation doesn't work.
......
......@@ -23,8 +23,8 @@
# LIBGCC
# MULTILIBS
# EXTRA_MULTILIB_PARTS
# SHLIB_EXT
# SHLIB_LINK
# SHLIB_LIBS
# SHLIB_MULTILIB
# SHLIB_MKMAP
# SHLIB_MAPFILES
......@@ -286,12 +286,12 @@ for ml in $MULTILIBS; do
if [ "$SHLIB_LINK" -a "$SHLIB_MKMAP" -a -z "$mapfile" ]; then
mapfile="libgcc.map"
shlib_deps="$shlib_deps $mapfile"
echo ""
echo "${mapfile}: $SHLIB_MKMAP $SHLIB_MAPFILES $libgcc_objs"
echo ' { $(NM_FOR_TARGET) -pg'" $libgcc_objs; echo %%; cat $SHLIB_MAPFILES; } | "'$(AWK)'" -f $SHLIB_MKMAP > "'tmp-$@'
echo ' mv tmp-$@ $@'
fi
shlib_deps="$shlib_deps $mapfile"
# Depend on EXTRA_MULTILIB_PARTS, since that's where crtbegin/end
# usually are put in a true multilib situation.
......@@ -315,13 +315,23 @@ for ml in $MULTILIBS; do
shlib_base_name=libgcc_s_`echo $dir | sed s,/,_,g`
fi
echo ""
echo "${dir}/${shlib_base_name}.so: $shlib_deps"
echo " $SHLIB_LINK $flags -o ${shlib_base_name}.so $libgcc_objs $SHLIB_LIBS" | sed "s/@shlib_base_name@/$shlib_base_name/g"
echo "${dir}/${shlib_base_name}${SHLIB_EXT}: $shlib_deps"
echo " $SHLIB_LINK" \
| sed -e "s%@multilib_flags@%$flags%g" \
-e "s%@multilib_dir@%$dir%g" \
-e "s%@shlib_objs@%$libgcc_objs%g" \
-e "s%@shlib_base_name@%$shlib_base_name%g" \
-e "s%@shlib_map_file@%$mapfile%g"
elif [ "$SHLIB_MULTILIB" = "$dir" ]; then
shlib_base_name="libgcc_s";
echo ""
echo "${shlib_base_name}.so: $shlib_deps"
echo " $SHLIB_LINK $flags -o ${shlib_base_name}.so $libgcc_objs $SHLIB_LIBS" | sed "s/@shlib_base_name@/$shlib_base_name/g"
echo "${shlib_base_name}${SHLIB_EXT}: $shlib_deps"
echo " $SHLIB_LINK" \
| sed -e "s%@multilib_flags@%$flags%g" \
-e "s%@multilib_dir@%$dir%g" \
-e "s%@shlib_objs@%$libgcc_objs%g" \
-e "s%@shlib_base_name@%$shlib_base_name%g" \
-e "s%@shlib_map_file@%$mapfile%g"
fi
fi
done
......@@ -359,15 +369,10 @@ for ml in $MULTILIBS; do
else
suff=_`echo $dir | sed s,/,_,g`
fi
all="$all ${dir}/libgcc_s${suff}.so"
all="$all ${dir}/libgcc_s${suff}${SHLIB_EXT}"
elif [ "$SHLIB_MULTILIB" = "$dir" ]; then
all="$all libgcc_s.so"
all="$all libgcc_s${SHLIB_EXT}"
fi
if [ "$dir" = "." ]; then
suff="";
else
suff=_`echo $dir | sed s,/,_,g`
fi
fi
done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment