Commit 0cb4334e by H.J. Lu Committed by H.J. Lu

re PR bootstrap/18532 (libgcc.mk isn't parallel build safe for multilib)

2004-12-02  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/18532
	* mklibgcc.in: Build one set of EXTRA_MULTILIB_PARTS for
	multilib at a time. Don't build the default set. Don't add
	EXTRA_MULTILIB_PARTS to shared libunwind nor libgcc. Remove
	filter for shared libunwind and libgcc.

From-SVN: r91663
parent 14c473b9
2004-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR bootstrap/18532
* mklibgcc.in: Build one set of EXTRA_MULTILIB_PARTS for
multilib at a time. Don't build the default set. Don't add
EXTRA_MULTILIB_PARTS to shared libunwind nor libgcc. Remove
filter for shared libunwind and libgcc.
2004-12-02 Roger Sayle <roger@eyesopen.com> 2004-12-02 Roger Sayle <roger@eyesopen.com>
PR target/18759 PR target/18759
......
...@@ -160,6 +160,11 @@ for ml in $MULTILIBS; do ...@@ -160,6 +160,11 @@ for ml in $MULTILIBS; do
libgcc_s_so= libgcc_s_so=
libunwind_a= libunwind_a=
libunwind_so= libunwind_so=
if [ "$dir" = . ]; then
suffix=
else
suffix=`echo $dir | sed s,/,_,g`
fi
if [ "$LIBUNWIND" ]; then if [ "$LIBUNWIND" ]; then
libunwind_a=$dir/libunwind.a libunwind_a=$dir/libunwind.a
...@@ -177,7 +182,6 @@ for ml in $MULTILIBS; do ...@@ -177,7 +182,6 @@ for ml in $MULTILIBS; do
libunwind_soname=libunwind 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_${suffix} 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}
...@@ -655,37 +659,45 @@ for ml in $MULTILIBS; do ...@@ -655,37 +659,45 @@ for ml in $MULTILIBS; do
done done
# EXTRA_MULTILIB_PARTS. # EXTRA_MULTILIB_PARTS.
echo if [ -n "$EXTRA_MULTILIB_PARTS" ]; then
for f in $EXTRA_MULTILIB_PARTS; do # Each of the EXTRA_MULTILIB_PARTS is built by recursive invocation
case $dir in # of the parent Makefile. We must do this just once for each
.) out=$f ; t= ;; # multilib, passing it all the EXTRA_MULTILIB_PARTS as
*) out=$dir/$f ; t=$dir/ ;; # simultaneous goal targets, so that rules which cannot execute
esac # simultaneously are properly serialized.
case $out in
# Prevent `make' from interpreting $out as a macro assignment # We don't need to build the default ones since they have been
*'$(EQ)'*) targ="T_TARGET=$out T_TARGET" ;; # built before we get here.
*) targ=$out ;; if [ $dir != "." ]; then
esac extra=
t=$dir/
echo $out: stmp-dirs echo
echo " $make_compile" \\ for f in $EXTRA_MULTILIB_PARTS; do
echo ' LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)' $flags '" ' \\ out=$dir/$f
echo ' MULTILIB_CFLAGS="'$flags'"' T=$t $targ case $out in
echo "all: $out" # Prevent `make' from interpreting $out as a macro assignment
*'$(EQ)'*) targ="T_TARGET=$out T_TARGET" ;;
# Make libunwind.so and libgcc_s.so depend on these, since they are *) targ=$out ;;
# likely to be implicitly used by the link process. However, we must esac
# then arrange to remove them from the explicit object list generated extra="$extra $targ"
# from $^ - see below. done
if [ "$libgcc_s_so" ]; then
libgcc_s_so_extra="$libgcc_s_so_extra $out" echo extra$suffix: stmp-dirs
echo "$libgcc_s_so: $out" echo " $make_compile" \\
fi echo ' LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)' $flags '" ' \\
if [ "$libunwind_so" ]; then echo ' MULTILIB_CFLAGS="'$flags'"' T=$t $extra
libunwind_so_extra="$libunwind_so_extra $out" echo "all: extra$suffix"
echo "$libunwind_so: $out"
# Make libunwind.so and libgcc_s.so depend on these, since they
# are likely to be implicitly used by the link process.
if [ "$libgcc_s_so" ]; then
echo "$libgcc_s_so: extra$suffix"
fi
if [ "$libunwind_so" ]; then
echo "$libunwind_so: extra$suffix"
fi
fi fi
done fi
# 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'`
...@@ -760,7 +772,7 @@ EOF ...@@ -760,7 +772,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@%\$(filter-out $libgcc_s_so_extra,\$(objects))%g" \ -e "s%@shlib_objs@%\$(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" \
...@@ -775,7 +787,7 @@ EOF ...@@ -775,7 +787,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@%\$(filter-out $libunwind_so_extra,\$(objects))%g" \ -e "s%@shlib_objs@%\$(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" \
......
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