Hi Dave, Note: this does cause a build break for cross compilers with —enable-languages=all (if the linkers for host and target have different command line options used in the build)
(it is not a serious break, one can exclude jit by manually listing all the other languages) - nevertheless, it would be good to establish if there is a meaningful use-case for libgccjit in a cross-compiler, and if so fix the configuration - or (if no meaningful use-case) exclude it as per the patch. thanks Iain > On 26 Jun 2022, at 14:06, Iain Sandoe <i...@sandoe.co.uk> wrote: > > Hi Dave, folks, > > It seems to me that it is plausible that one could use the JIT in a > heterogenous system, e.g. an x86_64-linux-host with some kind of co-processor > which is supported as a GCC target (and therefore can be loaded with jit-d > code) … but I’m not aware of anyone actually doing this? > > .. is that use case even reasonable given the current implementation? > (I guess there are invocations of the assembler etc. .. I’m not sure if these > would work as currently implemented) > > ---- > > It’s mildly inconvenient that the build for cross compilers generally fails > for me on Darwin (reason 1 below) since I tend to configure by default with > —enable-languages=all (and most Darwin platform versions default to > host_shared). So I’d like to see what the best way forward is ….. > > ---- > > In the short-term there are some issues with the configuration for > cross-compilers… > > 1) the values queried in gcc/jit/Make-lang.in relate to the ‘ld’ that is used > for $target not the one used for $host. > > - this means that if we are on a $host with an non-binutils-ld and building a > cross-compiler for a $target that *does* use binutils-ld, the configuration > selects flags that do not work so that the build fails. > - of course, things might fail more subtly in the case that there were two > *different* binutils ld instances. > > 2) the testsuite obviously does not work. > > So .. one possibility is to disable jit for cross-compilers, (patch attached) > .. > > … another is to find a way to fix the configuration to pick up suitable > values for $host (although I’m not sure how much of that we have readily > available, since usually libtool is doing that work). > > thoughts? > cheers > Iain > > <0001-configure-Disable-jit-for-cross-compilers.patch>