From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 254883858D33 for ; Wed, 9 Aug 2023 19:31:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 254883858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691609479; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lOkmg68G2Auyxc5cBpmvg+CObgD9bZqQkNymEqVOcEA=; b=PpApagT3HMkJ74qR8jDHvs0IZyaRk8YlvQTN2Hhw+KOWCa1oR5Lv5c9C+ciFe+6E4/r9u3 JXDrHtwOsv4LuKS3JZ/ep9uuFxP6BJFF1XFGZR72uZP1Jl1vCV/CKJfWcUH8K9daO0Zxyq A0a2OkTBfE+AOrOrWAiTFvfgcwwuvCk= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-180-rNJJJ0EuOFG7NQ1kkgo6bw-1; Wed, 09 Aug 2023 15:31:18 -0400 X-MC-Unique: rNJJJ0EuOFG7NQ1kkgo6bw-1 Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7659d103147so23105085a.3 for ; Wed, 09 Aug 2023 12:31:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691609478; x=1692214278; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:to:from:subject:message-id:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lOkmg68G2Auyxc5cBpmvg+CObgD9bZqQkNymEqVOcEA=; b=Jmjm1amPng/Eximz+mVDzU0+FZoh7+BCRGVGxv2aXqxT25QAUBeR92ob5S8hCRuaNO GQAth6JvP08KPDpzuScs4c3IEECxQvWD2eUxCOKjmMQ9pwky5xD2x8ix/3fga8yF8Xq/ LgkWyOL1ZMwmIu5q3tW7I0r3RepYViXgum6Wv8y1TlKCqyVzn54lQTb70bgOrcOqzgdi cCcfDquFxQ8HPtKl14lsKWmz2eo6WS+T8yANrkQ+8QUH74PxeZCwqGSivB6PQMVhh7n3 9lLBIPezNd5IWEQWE6gNsukF9NYXKi71hblsqG+swMhwcfttCWmOZrtaJG9IYEm2GS+Y iCeQ== X-Gm-Message-State: AOJu0YzGCS2ben0h4mOUrhW9aQVcX4zCUY+f/SV7WPEXtNWoakU7Supy s3jXjxnUZodpRficglWydqQubcVdIhxqXA+HNTFRn4DtKYn5RQWhsOU1/j6DEY+KV9lZPoGB1wb JrsaM9YVbzJtInp8= X-Received: by 2002:a05:620a:95c:b0:767:915a:ccf6 with SMTP id w28-20020a05620a095c00b00767915accf6mr3860703qkw.65.1691609477840; Wed, 09 Aug 2023 12:31:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHmULrOoK3Yosd7vQ1NtABJg/D3d9GgdvF1ZSIrFZPFZA3iaZrSJmdyfPRyPwbZ3OQL4HlW7A== X-Received: by 2002:a05:620a:95c:b0:767:915a:ccf6 with SMTP id w28-20020a05620a095c00b00767915accf6mr3860689qkw.65.1691609477559; Wed, 09 Aug 2023 12:31:17 -0700 (PDT) Received: from t14s.localdomain (c-76-28-97-5.hsd1.ma.comcast.net. [76.28.97.5]) by smtp.gmail.com with ESMTPSA id g6-20020ae9e106000000b0076c70eccd05sm4192829qkm.108.2023.08.09.12.31.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Aug 2023 12:31:16 -0700 (PDT) Message-ID: <44725e8bb5e35c091f5be72ba72d689dcb7ab586.camel@redhat.com> Subject: Re: Libgccjit detection From: David Malcolm To: "Li, Yicheng" , "jit@gcc.gnu.org" Date: Wed, 09 Aug 2023 15:31:15 -0400 In-Reply-To: <20BEAD4F-7DF3-4E27-A660-6338304F78BC@vols.utk.edu> References: <20BEAD4F-7DF3-4E27-A660-6338304F78BC@vols.utk.edu> User-Agent: Evolution 3.44.4 (3.44.4-2.fc36) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Wed, 2023-08-09 at 17:45 +0000, Li, Yicheng via Jit wrote: > Hi, >=20 > Is there a way to detect libgccjit within C code? I'm not sure what you mean here, sorry. If you want the ability to compile a source file containing gcc_jit_* calls, but want to make having libgccjit.h optional at compile-time, then presumably you need your project to have some kind of configure test that determines if ligccjit is available, sets up a macro define, and to wrap your calls to gcc_jit_* in some kind of #if HAVE_LIBGCCJIT=20 to use the macro. For specific features within libgccjit.h, I've tried to add a=20 #ifdef LIBGCCJIT_HAVE_name_of_feature as I add them. For example, there's a: #ifdef LIBGCCJIT_HAVE_gcc_jit_context_set_bool_allow_unreachable_blocks which could be used to wrap calls to that specific function. > I=E2=80=99m trying to compile the program without =E2=80=9C-lgccjit=E2=80= =9D, but I load the > corresponding PATH and LD_LIBRARY_PATH. Did the above answer your question, or did I misunderstand? Dave