jit and cross-compilers (use and configuration).

Iain Sandoe iain@sandoe.co.uk
Sun Jun 26 13:06:01 GMT 2022


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-configure-Disable-jit-for-cross-compilers.patch
Type: application/octet-stream
Size: 2982 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20220626/c211cd2c/attachment.obj>


More information about the Gcc mailing list