On Thu, 6 Nov 2014 10:06:00 +0100 Thomas Schwinge <tho...@codesourcery.com> wrote:
> Hi Julian! > > On Wed, 5 Nov 2014 17:57:10 +0000, Julian Brown > <jul...@codesourcery.com> wrote: > > This patch moves plugin-nvptx.c and plugin-host.c (from oacc-host.c) > > into a new "plugin" subdirectory, as requested by Jakub, and to > > match more closely the layout of the Intel MIC pieces. This also > > moves the autotools bits to enable the NVPTX plugin and locate CUDA > > libraries into the plugin directory's (new) configury bits. > > Hmm. And then we "cross-include" files in libgomp/ from > libgomp/plugin/ as well as the other way round (libgomp/oacc-host.c > including libgomp/plugin/plugin-host.c, for example) -- whilst these > two "regimes" are configured by two separate Autoconf instances? Is > this really the intended scheme, or should we maybe rather have a > top-level libgomp Autoconf/Automake system (as before), which is > amended by libgomp/plugin/configfrag.ac and > libgomp/plugin/Makefrag.am files that are included from > libgomp/configure.ac and libgomp/Makefile.am? I don't know -- I was trying to follow "existing practice" (or how I imagine that to be) with regard to recursive autotools invocations (e.g. libjava/libltdl), and I have some FUD, probably misplaced, about how well non-recursive autotools works. A couple of the header files (oacc-plugin.h, libgomp-plugin.h) might be better placed within the plugin directory, but plugins will generally still need to include some headers direct from libgomp/. Maybe this reorg is just a bad idea? > > Test results look reasonable with my (patched for PTX support) > > version of the gomp4 branch. I'll apply it there shortly. > > Mid-air collision with my yesterday's libgomp changes -- with your > patch in (r217162), gomp-4_0-branch doesn't even build; the files > added/moved to libgomp/plugins/ are missing some of my changes. (I > didn't look/compare in more detail.) Apologies, I thought I'd fixed those up, but it looks like I missed a bit. > > libgomp/ > > * Makefile.am (SUBDIRS): Add plugin. > > (DIST_SUBDIRS): Define. > > (libgomp_plugin_nvptx_*): Remove nvptx support from here. > > (libgomp_plugin_host_nonshm_*): Likewise. > > * Makefile.in: Regenerate. > > * configure: Regenerate. > > * oacc-host.c: Replace with #include of plugin/plugin-host.c > > code, move implementation to the latter. > > * plugin/plugin-host.c: New file. > > * plugin-nvptx.c: Move to... > > * plugin/plugin-nvptx.c: New file. > > * plugin/Makefile.am: New. > > * plugin/Makefile.in: Regenerate. > > * plugin/aclocal.m4: Regenerate. > > * plugin/configure: Regenerate. > > Please check in the regenerated libgomp/config.h.in, update > contrib/gcc_update, and make generation of > libgomp/testsuite/libgomp-test-support.exp work again, that is, > substitution of @CUDA_DRIVER_INCLUDE@ and @CUDA_DRIVER_LIB@ (perhaps > move instantiation from libgomp/configure.ac to > libgomp/plugin/configure.ac). I'll fix this. Thanks, Julian