From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp002.apm-internet.net (smtp002.apm-internet.net [85.119.248.221]) by sourceware.org (Postfix) with ESMTPS id 653443858D1E for ; Wed, 6 Jul 2022 16:11:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 653443858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sandoe.co.uk Received: (qmail 93358 invoked from network); 6 Jul 2022 16:11:11 -0000 X-APM-Out-ID: 16571238719335 X-APM-Authkey: 257869/1(257869/1) 5 Received: from unknown (HELO ?192.168.1.95?) (81.138.1.83) by smtp002.apm-internet.net with SMTP; 6 Jul 2022 16:11:11 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Subject: [ping] Re: jit and cross-compilers (use and configuration). From: Iain Sandoe In-Reply-To: Date: Wed, 6 Jul 2022 17:11:11 +0100 Cc: GCC Development Content-Transfer-Encoding: quoted-printable Message-Id: References: To: David Malcolm X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Spam-Status: No, score=-8.6 required=5.0 tests=BAYES_00, KAM_COUK, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2022 16:11:15 -0000 Hi Dave, Note: this does cause a build break for cross compilers with = =E2=80=94enable-languages=3Dall (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 wrote: >=20 > Hi Dave, folks, >=20 > 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) =E2=80=A6 but I=E2=80=99m not aware of anyone = actually doing this? >=20 > .. is that use case even reasonable given the current implementation? > (I guess there are invocations of the assembler etc. .. I=E2=80=99m = not sure if these would work as currently implemented) >=20 > ---- >=20 > It=E2=80=99s 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 =E2=80=94enable-languages=3Dall (and most = Darwin platform versions default to host_shared). So I=E2=80=99d like = to see what the best way forward is =E2=80=A6.. >=20 > ---- >=20 > In the short-term there are some issues with the configuration for = cross-compilers=E2=80=A6 >=20 > 1) the values queried in gcc/jit/Make-lang.in relate to the =E2=80=98ld=E2= =80=99 that is used for $target not the one used for $host. >=20 > - 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. >=20 > 2) the testsuite obviously does not work. >=20 > So .. one possibility is to disable jit for cross-compilers, (patch = attached) ..=20 >=20 > =E2=80=A6 another is to find a way to fix the configuration to pick up = suitable values for $host (although I=E2=80=99m not sure how much of = that we have readily available, since usually libtool is doing that = work). >=20 > thoughts? > cheers > Iain >=20 > <0001-configure-Disable-jit-for-cross-compilers.patch>