Commit 80ded125 by Zack Weinberg

mklibgcc.in: Correct calculation of libgcc_s_soname and libunwind_soname.

	* mklibgcc.in: Correct calculation of libgcc_s_soname and
	libunwind_soname.  Use $out, not $outS, in commands for
	no-shared-library case.  Move EXTRA_MULTILIB_PARTS rules above
	library build rules, make $libunwind_so and $libgcc_s_so
	depend on them in the normal fashion, and filter those objects
	out of @shlib_objs@.

From-SVN: r91534
parent 98705d7d
2004-11-30 Zack Weinberg <zack@codesourcery.com>
* mklibgcc.in: Correct calculation of libgcc_s_soname and
libunwind_soname. Use $out, not $outS, in commands for
no-shared-library case. Move EXTRA_MULTILIB_PARTS rules above
library build rules, make $libunwind_so and $libgcc_s_so
depend on them in the normal fashion, and filter those objects
out of @shlib_objs@.
2004-11-30 Janis Johnson <janis187@us.ibm.com> 2004-11-30 Janis Johnson <janis187@us.ibm.com>
* config/rs6000/altivec.h (vec_step_help): Support const vector types. * config/rs6000/altivec.h (vec_step_help): Support const vector types.
......
...@@ -170,23 +170,24 @@ for ml in $MULTILIBS; do ...@@ -170,23 +170,24 @@ for ml in $MULTILIBS; do
libgcc_eh_a=$dir/libgcc_eh.a libgcc_eh_a=$dir/libgcc_eh.a
libgcc_s_so_base=$dir/libgcc_s libgcc_s_so_base=$dir/libgcc_s
libgcc_s_so=${libgcc_s_so_base}${SHLIB_EXT} libgcc_s_so=${libgcc_s_so_base}${SHLIB_EXT}
libgcc_s_soname=libgcc_s
if [ "$LIBUNWIND" ]; then if [ "$LIBUNWIND" ]; then
libunwind_so_base=$dir/libunwind libunwind_so_base=$dir/libunwind
libunwind_so=${libunwind_so_base}${SHLIB_EXT} libunwind_so=${libunwind_so_base}${SHLIB_EXT}
libunwind_soname=libunwind
fi fi
else else
suffix=`echo $dir | sed s,/,_,g`
libgcc_eh_a=$dir/libgcc_eh.a libgcc_eh_a=$dir/libgcc_eh.a
libgcc_s_so_base=$dir/libgcc_s_`echo $dir | sed s,/,_,g` libgcc_s_so_base=$dir/libgcc_s_${suffix}
libgcc_s_so=${libgcc_s_so_base}${SHLIB_EXT} libgcc_s_so=${libgcc_s_so_base}${SHLIB_EXT}
libgcc_s_soname=libgcc_s_${suffix}
if [ "$LIBUNWIND" ]; then if [ "$LIBUNWIND" ]; then
libunwind_so_base=$dir/libunwind_`echo $dir | sed s,/,_,g` libunwind_so_base=$dir/libunwind_${suffix}
libunwind_so=${libunwind_so_base}${SHLIB_EXT} libunwind_so=${libunwind_so_base}${SHLIB_EXT}
fi fi
fi fi
libgcc_s_soname=$libgcc_s_so_base
libunwind_soname=$libunwind_so_base
if [ -n "$MULTILIB_OSDIRNAMES" ]; then if [ -n "$MULTILIB_OSDIRNAMES" ]; then
if [ "$dir" != . ]; then if [ "$dir" != . ]; then
gcc_multilib_dir=`./xgcc -B./ $flags --print-multi-directory` gcc_multilib_dir=`./xgcc -B./ $flags --print-multi-directory`
...@@ -212,15 +213,16 @@ for ml in $MULTILIBS; do ...@@ -212,15 +213,16 @@ for ml in $MULTILIBS; do
libgcc_eh_a=$dir/libgcc_eh.a libgcc_eh_a=$dir/libgcc_eh.a
libgcc_s_so_base=$dir/libgcc_s libgcc_s_so_base=$dir/libgcc_s
libgcc_s_so=${libgcc_s_so_base}${SHLIB_EXT} libgcc_s_so=${libgcc_s_so_base}${SHLIB_EXT}
libgcc_s_soname=libgcc_s
if [ "$LIBUNWIND" ]; then if [ "$LIBUNWIND" ]; then
libunwind_so_base=$dir/libunwind libunwind_so_base=$dir/libunwind
libunwind_so=${libunwind_so_base}${SHLIB_EXT} libunwind_so=${libunwind_so_base}${SHLIB_EXT}
libunwind_soname=libunwind
fi fi
libgcc_s_soname=$libgcc_s_so_base
libunwind_soname=$libunwind_so_base
fi fi
fi fi
libgcc_s_so_extra=
libunwind_so_extra=
echo echo
echo \# echo \#
...@@ -312,7 +314,7 @@ for ml in $MULTILIBS; do ...@@ -312,7 +314,7 @@ for ml in $MULTILIBS; do
else else
out="libgcc/${dir}/${name}${objext}" out="libgcc/${dir}/${name}${objext}"
echo ${out}: stmp-dirs '$(srcdir)/config/$(LIB1ASMSRC)' echo ${out}: stmp-dirs '$(srcdir)/config/$(LIB1ASMSRC)'
echo " $gcc_compile" $flags -DL$name -c '$(srcdir)/libgcc2.c' -o $outS echo " $gcc_compile" $flags -DL$name -c '$(srcdir)/libgcc2.c' -o $out
echo $libgcc_a: $out echo $libgcc_a: $out
fi fi
done done
...@@ -348,7 +350,7 @@ for ml in $MULTILIBS; do ...@@ -348,7 +350,7 @@ for ml in $MULTILIBS; do
out="libgcc/${dir}/${name}${objext}" out="libgcc/${dir}/${name}${objext}"
echo ${out}: stmp-dirs '$(srcdir)/config/$(LIB1ASMSRC)' echo ${out}: stmp-dirs '$(srcdir)/config/$(LIB1ASMSRC)'
echo " $gcc_compile" $flags -DL$name \ echo " $gcc_compile" $flags -DL$name \
-fexceptions -fnon-call-exceptions -c '$(srcdir)/libgcc2.c' -o $outS -fexceptions -fnon-call-exceptions -c '$(srcdir)/libgcc2.c' -o $out
echo $libgcc_a: $out echo $libgcc_a: $out
fi fi
done done
...@@ -590,7 +592,7 @@ for ml in $MULTILIBS; do ...@@ -590,7 +592,7 @@ for ml in $MULTILIBS; do
fi fi
done done
else # no SHLIB_LINK else # no libgcc_eh.a
for file in $LIB2ADDEH; do for file in $LIB2ADDEH; do
case $file in case $file in
*.c) ;; *.c) ;;
...@@ -652,6 +654,39 @@ for ml in $MULTILIBS; do ...@@ -652,6 +654,39 @@ for ml in $MULTILIBS; do
echo $libgcov_a: $out echo $libgcov_a: $out
done done
# EXTRA_MULTILIB_PARTS.
echo
for f in $EXTRA_MULTILIB_PARTS; do
case $dir in
.) out=$f ; t= ;;
*) out=$dir/$f ; t=$dir/ ;;
esac
case $out in
# Prevent `make' from interpreting $out as a macro assignment
*'$(EQ)'*) targ="T_TARGET=$out T_TARGET" ;;
*) targ=$out ;;
esac
echo $out: stmp-dirs
echo " $make_compile" \\
echo ' LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)' $flags '" ' \\
echo ' MULTILIB_CFLAGS="'$flags'"' T=$t $targ
echo "all: $out"
# Make libunwind.so and libgcc_s.so depend on these, since they are
# likely to be implicitly used by the link process. However, we must
# then arrange to remove them from the explicit object list generated
# from $^ - see below.
if [ "$libgcc_s_so" ]; then
libgcc_s_so_extra="$libgcc_s_so_extra $out"
echo "$libgcc_s_so: $out"
fi
if [ "$libunwind_so" ]; then
libunwind_so_extra="$libunwind_so_extra $out"
echo "$libunwind_so: $out"
fi
done
# Library build rules. # Library build rules.
dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'` dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
...@@ -677,14 +712,6 @@ $libgcc_s_so: ${mapfile} ...@@ -677,14 +712,6 @@ $libgcc_s_so: ${mapfile}
EOF EOF
fi fi
# Depend on EXTRA_MULTILIB_PARTS, since that's where crtbegin/end
# usually are put in a true multilib situation.
shlib_extra_deps=""
for f in $EXTRA_MULTILIB_PARTS; do
shlib_extra_deps="$shlib_extra_deps $dir/$f"
done
echo $libgcc_s_so: $shlib_extra_deps
# Static libraries. # Static libraries.
# Each of these .a files depends on stmp-dirs. It would seem that # Each of these .a files depends on stmp-dirs. It would seem that
...@@ -733,7 +760,7 @@ EOF ...@@ -733,7 +760,7 @@ EOF
echo " $SHLIB_LINK" \ echo " $SHLIB_LINK" \
| sed -e "s%@multilib_flags@%$flags%g" \ | sed -e "s%@multilib_flags@%$flags%g" \
-e "s%@multilib_dir@%$dir%g" \ -e "s%@multilib_dir@%$dir%g" \
-e "s%@shlib_objs@%\$(objects)%g" \ -e "s%@shlib_objs@%\$(filter-out $libgcc_s_so_extra,\$(objects))%g" \
-e "s%@shlib_base_name@%$libgcc_s_so_base%g" \ -e "s%@shlib_base_name@%$libgcc_s_so_base%g" \
-e "s%@shlib_so_name@%$libgcc_s_soname%g" \ -e "s%@shlib_so_name@%$libgcc_s_soname%g" \
-e "s%@shlib_map_file@%$mapfile%g" \ -e "s%@shlib_map_file@%$mapfile%g" \
...@@ -748,7 +775,7 @@ EOF ...@@ -748,7 +775,7 @@ EOF
echo " $SHLIBUNWIND_LINK" \ echo " $SHLIBUNWIND_LINK" \
| sed -e "s%@multilib_flags@%$flags%g" \ | sed -e "s%@multilib_flags@%$flags%g" \
-e "s%@multilib_dir@%$dir%g" \ -e "s%@multilib_dir@%$dir%g" \
-e "s%@shlib_objs@%\$(objects)%g" \ -e "s%@shlib_objs@%\$(filter-out $libunwind_so_extra,\$(objects))%g" \
-e "s%@shlib_base_name@%$libunwind_so_base%g" \ -e "s%@shlib_base_name@%$libunwind_so_base%g" \
-e "s%@shlib_so_name@%$libunwind_soname%g" \ -e "s%@shlib_so_name@%$libunwind_soname%g" \
-e "s%@shlib_dir@%$shlib_dir%g" \ -e "s%@shlib_dir@%$shlib_dir%g" \
...@@ -756,25 +783,6 @@ EOF ...@@ -756,25 +783,6 @@ EOF
echo "all: $libunwind_so" echo "all: $libunwind_so"
fi fi
# EXTRA_MULTILIB_PARTS.
for f in $EXTRA_MULTILIB_PARTS; do
case $dir in
.) out=$f ; t= ;;
*) out=$dir/$f ; t=$dir/ ;;
esac
case $out in
# Prevent `make' from interpreting $out as a macro assignment
*'$(EQ)'*) targ="T_TARGET=$out T_TARGET" ;;
*) targ=$out ;;
esac
echo $out: stmp-dirs
echo " $make_compile" \\
echo ' LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)' $flags '" ' \\
echo ' MULTILIB_CFLAGS="'$flags'"' T=$t $targ
echo "all: $out"
done
done # ml in MULTILIBS done # ml in MULTILIBS
echo echo
......
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