https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127806

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
multi-do:
        @if [ -z "$(MULTIDIRS)" ]; then \
          true; \
        else \
          rootpre=`${PWD_COMMAND}`/; export rootpre; \
          srcrootpre=`cd $(srcdir); ${PWD_COMMAND}`/; export srcrootpre; \
          lib=`echo "$${rootpre}" | sed -e 's,^.*/\([^/][^/]*\)/$$,\1,'`; \
          compiler="$(CC)"; \
          for i in `$${compiler} --print-multi-lib 2>/dev/null`; do \
            dir=`echo $$i | sed -e 's/;.*$$//'`; \
            if [ "$${dir}" = "." ]; then \
              true; \
            else \
              if [ -d ../$${dir}/$${lib} ]; then \
                flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
                libsuffix_=`$${compiler} $${flags} --print-multi-os-directory`;
\
                if (cd ../$${dir}/$${lib}; $(MAKE) $(subst \
                                -B$(build_tooldir)/lib/, \
                                -B$(build_tooldir)/lib/$${libsuffix_}/, \
                                $(FLAGS_TO_PASS)) \
                                CFLAGS="$(CFLAGS) $${flags}" \
                                CCASFLAGS="$(CCASFLAGS) $${flags}" \
...
                                $(DO)); then \
                  true; \
                else \
                  exit 1; \
                fi; \
              else true; \
              fi; \
            fi; \
          done; \
        fi
is the primary thing to try to parallelize I guess (except the primary multilib
is still built separately from this, so parallelizing this will help only for
2+ multilibs).
This comes from config-ml.in.  One would probably need to add
multi-do-{1,2,3,4,5,6,...} goals, figure out at config-ml.in invocation time
the upper bound of number of multilibs (or at runtime), have multi-do: have
dependencies on the individual multi-do-{1,2,3,4,5...} goals and have each one
just pick the nth multilib or something similar.

Reply via email to