From d44c82c9ba6566997144b2863ad87aa91148352a Mon Sep 17 00:00:00 2001 From: hjl Date: Thu, 2 Dec 2004 21:49:00 +0000 Subject: [PATCH] 2004-12-02 H.J. Lu 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91663 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 8 ++++++ gcc/mklibgcc.in | 78 +++++++++++++++++++++++++++++++++------------------------ 2 files changed, 53 insertions(+), 33 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 99b43d371b5..7acdb818ef1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2004-12-02 H.J. Lu + + 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 PR target/18759 diff --git a/gcc/mklibgcc.in b/gcc/mklibgcc.in index fa6930b1c60..916a0f5e3f0 100644 --- a/gcc/mklibgcc.in +++ b/gcc/mklibgcc.in @@ -160,6 +160,11 @@ for ml in $MULTILIBS; do libgcc_s_so= libunwind_a= libunwind_so= + if [ "$dir" = . ]; then + suffix= + else + suffix=`echo $dir | sed s,/,_,g` + fi if [ "$LIBUNWIND" ]; then libunwind_a=$dir/libunwind.a @@ -177,7 +182,6 @@ for ml in $MULTILIBS; do libunwind_soname=libunwind fi else - suffix=`echo $dir | sed s,/,_,g` libgcc_eh_a=$dir/libgcc_eh.a libgcc_s_so_base=$dir/libgcc_s_${suffix} libgcc_s_so=${libgcc_s_so_base}${SHLIB_EXT} @@ -655,37 +659,45 @@ for ml in $MULTILIBS; do 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" + if [ -n "$EXTRA_MULTILIB_PARTS" ]; then + # Each of the EXTRA_MULTILIB_PARTS is built by recursive invocation + # of the parent Makefile. We must do this just once for each + # multilib, passing it all the EXTRA_MULTILIB_PARTS as + # simultaneous goal targets, so that rules which cannot execute + # simultaneously are properly serialized. + + # We don't need to build the default ones since they have been + # built before we get here. + if [ $dir != "." ]; then + extra= + t=$dir/ + echo + for f in $EXTRA_MULTILIB_PARTS; do + out=$dir/$f + case $out in + # Prevent `make' from interpreting $out as a macro assignment + *'$(EQ)'*) targ="T_TARGET=$out T_TARGET" ;; + *) targ=$out ;; + esac + extra="$extra $targ" + done + + echo extra$suffix: stmp-dirs + echo " $make_compile" \\ + echo ' LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)' $flags '" ' \\ + echo ' MULTILIB_CFLAGS="'$flags'"' T=$t $extra + echo "all: extra$suffix" + + # 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 - done + fi # Library build rules. dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'` @@ -760,7 +772,7 @@ EOF echo " $SHLIB_LINK" \ | sed -e "s%@multilib_flags@%$flags%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_so_name@%$libgcc_s_soname%g" \ -e "s%@shlib_map_file@%$mapfile%g" \ @@ -775,7 +787,7 @@ EOF echo " $SHLIBUNWIND_LINK" \ | sed -e "s%@multilib_flags@%$flags%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_so_name@%$libunwind_soname%g" \ -e "s%@shlib_dir@%$shlib_dir%g" \ -- 2.11.0