summaryrefslogtreecommitdiff
path: root/gcc/mklibgcc.in
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-06 05:46:02 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2000-10-06 05:46:02 +0000
commit111349c7a6577a6ce3130cd2e5f28706be188c39 (patch)
treebe4a2f085ae65cf6912abaacdb552d587cf5422f /gcc/mklibgcc.in
parentd0b85c45f700e6b6e97608db91b7f071a8acea17 (diff)
downloadgcc-111349c7a6577a6ce3130cd2e5f28706be188c39.tar.gz
* Makefile.in (NM_FOR_TARGET): New.
(libgcc.mk): Pass SHLIB_MKMAP, SHLIB_MAPFILES. (libgcc.a, stmp-multilib): Pass NM_FOR_TARGET. * mklibgcc.in: If SHLIB_MKMAP, build libgcc.map. Depend the shared library build on that and EXTRA_MULTILIB_PARTS. * mkmap-flat.awk: New file. * mkmap-symver.awk: New file. * libgcc-std.ver: New file. * config/libgcc-glibc.ver: New file. * config/ia64/libgcc-ia64.ver: New file. * config/t-linux (SHLIB_MKMAP, SHLIB_MAPFILES): New. (SHLIB_LINK): Add --version-script. * config/ia64/t-ia64 (SHLIB_MAPFILES): Add libgcc-ia64.ver. * config/mips/t-iris6 (SHLIB_MKMAP, SHLIB_MAPFILES): New. * config/sparc/t-sol2 (SHLIB_MKMAP, SHLIB_MAPFILES): New. (SHLIB_LINK): Add -M. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36746 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/mklibgcc.in')
-rw-r--r--gcc/mklibgcc.in24
1 files changed, 22 insertions, 2 deletions
diff --git a/gcc/mklibgcc.in b/gcc/mklibgcc.in
index 54dcf2b848c..43dac4f75b3 100644
--- a/gcc/mklibgcc.in
+++ b/gcc/mklibgcc.in
@@ -26,6 +26,8 @@
# SHLIB_LINK
# SHLIB_LIBS
# SHLIB_MULTILIB
+# SHLIB_MKMAP
+# SHLIB_MAPFILES
# Make needs VPATH to be literal.
echo 'srcdir = @srcdir@'
@@ -263,6 +265,8 @@ for file in $LIB2ADD; do
fi
done
+# SHLIB_MKMAP
+# SHLIB_MAPFILES
for ml in $MULTILIBS; do
dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
@@ -278,6 +282,22 @@ for ml in $MULTILIBS; do
for o in $libgcc2_objs; do
libgcc_objs="$libgcc_objs libgcc/${dir}/$o"
done
+ shlib_deps="$libgcc_objs"
+
+ 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
+
+ # Depend on EXTRA_MULTILIB_PARTS, since that's where crtbegin/end
+ # usually are put in a true multilib situation.
+ for f in $EXTRA_MULTILIB_PARTS; do
+ shlib_deps="$shlib_deps $dir/$f"
+ done
echo ""
echo "${dir}/libgcc.a: $libgcc_objs"
@@ -295,12 +315,12 @@ for ml in $MULTILIBS; do
shlib_base_name=libgcc_s_`echo $dir | sed s,/,_,g`
fi
echo ""
- echo "${dir}/${shlib_base_name}.so: $libgcc_objs"
+ 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"
elif [ "$SHLIB_MULTILIB" = "$dir" ]; then
shlib_base_name="libgcc_s";
echo ""
- echo "${shlib_base_name}.so: $libgcc_objs"
+ 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"
fi
fi