This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: PR bootstrap/18532: libgcc.mk isn't parallel build
On Thu, Dec 02, 2004 at 03:09:31PM -0800, Zack Weinberg wrote:
> Richard Earnshaw <Richard.Earnshaw@buzzard.freeserve.co.uk> writes:
>
> > On Thu, 02 Dec 2004 13:10:13 PST, Zack Weinberg wrote:
> >> "H. J. Lu" <hjl@lucon.org> writes:
> >>
> >> > On Thu, Dec 02, 2004 at 12:58:12PM -0800, Zack Weinberg wrote:
> >> >> "H. J. Lu" <hjl@lucon.org> writes:
> >> >>
> >> >> > Here are the updated patch and the libgcc.mk diff.
> >> >> >
> >> >> > H.J.
> >> >> > ----
> >> >> > 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.
> >> >>
> >> >> Only remaining problem that I see is that you lost the dependencies of
> >> >> libgcc_s.so and libunwind.so on the relevant extra$suffix target. OK
> >> >> with that put back in.
> >> >
> >> > I don't believe they are needed. libgcc_s.so and libunwind.so don't
> >> > use EXTRA_MULTILIB_PARTS. The "all" target depends on
> >> > EXTRA_MULTILIB_PARTS. Did I miss something?
> >>
> >> EXTRA_MULTILIB_PARTS tend to be the crt* files. Some of those are
> >> often implicitly used by the link command for a shared library.
> >
> > This patch has broken the build for an arm-elf cross. We no-longer build
> > crt<xxx>.o for the default multilib.
>
> Skipping . is presumably a mistake.
>
arm-elf doesn't define extra_parts. Here is the patch to restore the
default set of EXTRA_MULTILIB_PART.
H.J.
----
2004-12-02 H.J. Lu <hongjiu.lu@intel.com>
* mklibgcc.in: Put back the default set of EXTRA_MULTILIB_PART.
--- gcc/mklibgcc.in.default 2004-12-02 13:55:46.000000000 -0800
+++ gcc/mklibgcc.in 2004-12-02 16:12:26.525985742 -0800
@@ -666,36 +666,34 @@ for ml in $MULTILIBS; do
# 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
+ extra=
+ 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
+ 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