On Wed, 2015-03-04 at 11:09 -0500, David Malcolm wrote: > On Tue, 2015-03-03 at 11:49 +0100, Matthias Klose wrote: > > Both gccjit and gnat now use sphinx to build the documentation. While not a > > direct part of the build process, it would be nice to document the > > requirements > > on sphinx, and agree on a common version used to generate that > > documentation. > > > > Coming from a distro background where I have to "build from source", I know > > that > > sphinx is a bit less stable than say doxygen and texinfo. So some kind of > > version information, about not using sphinx plugins, etc. would be > > appreciated.
[...] > On the subject of packaging: when building libgccjit, > --enable-host-shared is needed, to get position-independent code, which > will slow down the regular compiler by a few percent. Hence when > packaging gcc with libgccjit, please configure and build twice: once > without --enable-host-shared for most languages, and once with > --enable-host-shared for the jit (this is what Jakub's done for Fedora > packages of gcc 5). AIUI, one should "make install" both > configurations, presumably installing the configuration with > --enable-host-shared, *then* the one without, so that the faster build > of "cc1" et al overwrites the slower build. > > (assuming all of the above is correct, I'll write it up for the jit > docs). I've committed the following to trunk as r221425. gcc/jit/ChangeLog: * docs/internals/index.rst (Packaging notes): New section. * docs/_build/texinfo/libgccjit.texi: Regenerate. --- gcc/jit/docs/internals/index.rst | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gcc/jit/docs/internals/index.rst b/gcc/jit/docs/internals/index.rst index cf024f3..d0852f9 100644 --- a/gcc/jit/docs/internals/index.rst +++ b/gcc/jit/docs/internals/index.rst @@ -236,6 +236,54 @@ variables: ./jit-hello-world hello world +Packaging notes +--------------- +The configure-time option :option:`--enable-host-shared` is needed when +building the jit in order to get position-independent code. This will +slow down the regular compiler by a few percent. Hence when packaging gcc +with libgccjit, please configure and build twice: + + * once without :option:`--enable-host-shared` for most languages, and + + * once with :option:`--enable-host-shared` for the jit + +For example: + +.. code-block:: bash + + # Configure and build with --enable-host-shared + # for the jit: + mkdir configuration-for-jit + pushd configuration-for-jit + $(SRCDIR)/configure \ + --enable-host-shared \ + --enable-languages=jit \ + --prefix=$(DESTDIR) + make + popd + + # Configure and build *without* --enable-host-shared + # for maximum speed: + mkdir standard-configuration + pushd standard-configuration + $(SRCDIR)/configure \ + --enable-languages=all \ + --prefix=$(DESTDIR) + make + popd + + # Both of the above are configured to install to $(DESTDIR) + # Install the configuration with --enable-host-shared first + # *then* the one without, so that the faster build + # of "cc1" et al overwrites the slower build. + pushd configuration-for-jit + make install + popd + + pushd standard-configuration + make install + popd + Overview of code structure -------------------------- -- 1.8.5.3