This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Wed, Dec 01, 2004 at 05:16:30PM -0800, Zack Weinberg wrote: > "H. J. Lu" <hjl@lucon.org> writes: > > > I updated my patch for PR bootstrap/18532 since mklibgcc.in has been > > modified. > > I'm not terribly confident in this patch. Could you please show > before-and-after diffs of the generated libgcc.mk for a target that > uses EXTRA_MULTILIB_PARTS? That will make it easier to evaluate. > I fixed some typos. Here is the updated patch and old/new libgcc.mks. H.J. --- 2004-12-01 H.J. Lu <hongjiu.lu@intel.com> PR bootstrap/18532 * mklibgcc.in: Only run make one at a time for multilib. --- gcc/mklibgcc.in.multilib 2004-12-01 10:11:00.000000000 -0800 +++ gcc/mklibgcc.in 2004-12-01 20:41:28.792280330 -0800 @@ -147,6 +147,7 @@ done # Rules to generate object files. # +prev_extra= for ml in $MULTILIBS; do # Work out relevant parameters that depend only on the multilib. @@ -655,37 +656,51 @@ 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 + if [ -n "$EXTRA_MULTILIB_PARTS" ]; then + # We can't have individual element in EXTRA_MULTILIB_PARTS as a + # target since it won't be parallel build safe. We bundle them + # together and pass them to Makefile. libgcc.mk has no knowledge + # of if and how EXTRA_MULTILIB_PARTS are built. + + suffix=-`echo ${dir} | sed -e 's,/,_,g'` + extra= + extra_out= + 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_out="$extra_out $out" + extra="$extra $targ" + done - echo $out: stmp-dirs + echo extra$suffix: stmp-dirs $prev_extra echo " $make_compile" \\ echo ' LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)' $flags '" ' \\ - echo ' MULTILIB_CFLAGS="'$flags'"' T=$t $targ - echo "all: $out" + 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. 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" + libgcc_s_so_extra="$libgcc_s_so_extra $extra_out" + echo "$libgcc_s_so: extra$suffix" fi if [ "$libunwind_so" ]; then - libunwind_so_extra="$libunwind_so_extra $out" - echo "$libunwind_so: $out" + libunwind_so_extra="$libunwind_so_extra $extra_out" + echo "$libunwind_so: extra$suffix" fi - done + + prev_extra=extra$suffix + fi # Library build rules. dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
Attachment:
libgcc.mk.old
Description: Text document
Attachment:
libgcc.mk.new
Description: Text document
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |