From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by sourceware.org (Postfix) with ESMTPS id C60CF383B409; Tue, 13 Jul 2021 06:41:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C60CF383B409 Received: by mail-ej1-x62b.google.com with SMTP id bu12so39629325ejb.0; Mon, 12 Jul 2021 23:41:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jGh58ZH+6aCpBXCCexzsUCwci+Ym9yBLR8Uwghgj0KE=; b=H2Bo6jnlcwFL6FA4iz+Qbead7XidS+p160/X+FGt4KAX8So1X20KfUI9wrJy7sPvZ3 P2TCTpakW7v9Q0lKff6XLwVaCapRYBfLHLbjHo5KsaqGtEGDPcedJZslWYPFR0zuN8mC Fiw9/QK3i79rcUcxLdfBUSbRJlioIyHHDAvuO0ZE06fLZ9c0LOPZnO8GICcyZkx4/Ft3 n5G0rjXxmWVRbPEltQXXDO6GywkOUAXkySwvyMtU8Yn6E3L9OqbIT4qfYge06uwT7m/I egbwAfXnPLCmPJ9CA2kCW90QaKSJ97sQg5+5g0pjXZvenFdyUNdbeQX+uGP1meHkhWcJ cvrQ== X-Gm-Message-State: AOAM53003cObhERYUHNMpt0TixHbg+FV6mX0paKcz8FzF70lUqhEWybp EGkUQohFiJyc3vZnt2BL64oQC0cCP7hexgjM/ic= X-Google-Smtp-Source: ABdhPJzrMm8mK56WzOTEtfOkHv6w0fqckC8bxOi/IMsp9mehCSc8DFfkkjsZm2rJpM9QY7/BjhPaf2+e7xBvg8zVVsc= X-Received: by 2002:a17:907:9812:: with SMTP id ji18mr3883256ejc.138.1626158508861; Mon, 12 Jul 2021 23:41:48 -0700 (PDT) MIME-Version: 1.0 References: <1553292046.18132.49.camel@redhat.com> <96c1d3f3-d8a1-9545-0269-df45e192c98e@ubuntu.com> <5a46c90f-aea4-7dd6-cbc6-db8cf29cba95@ubuntu.com> In-Reply-To: <5a46c90f-aea4-7dd6-cbc6-db8cf29cba95@ubuntu.com> From: Richard Biener Date: Tue, 13 Jul 2021 08:41:38 +0200 Message-ID: Subject: Re: [patch] PR jit/87808: Allow libgccjit to work without an external gcc driver To: Matthias Klose Cc: David Malcolm , GCC Patches , jit@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: jit@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Jit mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2021 06:41:51 -0000 On Mon, Jul 12, 2021 at 11:00 PM Matthias Klose wrote: > > On 3/26/19 12:52 PM, Matthias Klose wrote: > > On 22.03.19 23:00, David Malcolm wrote: > >> On Thu, 2019-03-21 at 12:26 +0100, Matthias Klose wrote: > >>> Fix PR jit/87808, the embedded driver still needing the external gcc > >>> driver to > >>> find the gcc_lib_dir. This can happen in a packaging context when > >>> libgccjit > >>> doesn't depend on the gcc package, but just on binutils and libgcc- > >>> dev packages. > >>> libgccjit probably could use /proc/self/maps to find the gcc_lib_dir, > >>> but that > >>> doesn't seem to be very portable. > >>> > >>> Ok for the trunk and the branches? > >>> > >>> Matthias > >> > >> [CCing the jit list] > >> > >> I've been trying to reproduce this bug in a working copy, and failing. > >> > >> Matthias, do you have a recipe you've been using to reproduce this? > > > > the JIT debug log shows the driver names that it wants to call. Are you sure > > that this driver isn't available anywhere? I configure the gcc build with > > --program-suffix=-8 --program-prefix=x86_64-linux-gnu-, and that one was only > > available in one place, /usr/bin. > > > > Matthias > > David, the bug report now has two more comments from people that the current > behavior is broken. Please could you review the patch? I think libgccjit should use the same strathegy for finding the install location like the driver does itself. I couldn't readily decipher its magic but at least there's STANDARD_EXEC_PREFIX which seems to be used as possible fallback. In particular your patch doesn't seem to work with a DESTDIR= install? Can we instead add a --with-gccjit-install-dir= or sth like that (whatever path to whatever files the JIT exactly looks for)? Richard. > Thanks, Matthias