On 05/27/2014 05:33 PM, Ilya Verbin wrote:
2014-05-27 15:15 GMT+04:00 Bernd Schmidt <ber...@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