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]

Re: Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation


On 05/27/2014 05:33 PM, Ilya Verbin wrote:
2014-05-27 15:15 GMT+04:00 Bernd Schmidt <bernds@codesourcery.com>:
On 05/27/2014 01:11 PM, Ilya Verbin wrote:
Do I understand correctly that you recommend to build our offload gcc
manually, rather than during configure/make?

Well, configure/make it separately - build and install it first.

If there was a way to generalize the Makefiles to allow target libraries to
be built for multiple targets, that would be pretty good too, but it might
be too much work for too little gain.

Ok.

And what about the mkoffload tool? Should it be built during the build
of the host or offload compiler?
Do you have any patches for Makefile that builds it?

It should be built for the offload compiler, since it needs offload-target-specific knowledge. In our t-nvptx file we currently have

mkoffload.o: $(srcdir)/config/nvptx/mkoffload.c
        $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
          -DDEFAULT_REAL_TARGET_MACHINE=\"$(real_target_noncanonical)\" \
          -DDEFAULT_TARGET_MACHINE=\"$(target_noncanonical)\" \
          $< $(OUTPUT_OPTION)

mkoffload$(exeext): mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) $(LIBDEPS) $(COMPILER) -o $@ mkoffload.o collect-utils.o libcommon-target.a $(LIBIBERTY) $(LIBS)

and in config.gcc:
nvptx-*)
        tm_file="${tm_file} newlib-stdint.h"
        tmake_file="nvptx/t-nvptx"
        if test x$enable_as_accelerator = xyes; then
                extra_programs="mkoffload\$(exeext)"
        fi
        ;;

That's all that's needed to build it.


Bernd


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]