public inbox for [email protected]
help / color / mirror / Atom feedFrom: Thomas Munro <[email protected]>
To: Tom Lane <[email protected]>
Cc: Andres Freund <[email protected]>
Cc: Alvaro Herrera <[email protected]>
Cc: Fabien COELHO <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: pgsql-committers <[email protected]>
Subject: Re: pgsql: Track LLVM 15 changes.
Date: Mon, 29 Dec 2025 22:15:57 +1300
Message-ID: <CA+hUKGJwFNH2yTLeWPaUy9Le=AgvEripEAdmyem7naKGGCAFEQ@mail.gmail.com> (raw)
In-Reply-To: <[email protected]>
References: <CA+hUKGLqengPszjoQeD_7nmHsjGZS380+ymke-Fm=nNGMEQuhw@mail.gmail.com>
<[email protected]>
<CA+hUKG+LX+mjBTPV=u4RnZU_5sp=BgCHh_91a1f1NFoKphtJWQ@mail.gmail.com>
<[email protected]>
<CA+hUKG+p=faBQR2PSAqWoWa+_tJdKPT0wjZPQe7XcDEttUCgdQ@mail.gmail.com>
<[email protected]>
<[email protected]>
<CA+hUKGKM6BWHy9oi9Oyt7wgVLgi3ht2hb=k0Tmf0RLDhkEEXkQ@mail.gmail.com>
<[email protected]>
On Fri, Dec 26, 2025 at 6:05 AM Tom Lane <[email protected]> wrote:
> Thomas Munro <[email protected]> writes:
> > Shortly I'll do the back-patch of LLVM 14 API changes (their final
> > release tag is scheduled for tomorrow, as I've been reminded by
> > package maintainers trying and failing to build). But I figured I
> > should also follow up on this bandaid solution to the API deprecation
> > warnings, that is, silencing them for now, so we don't spew screeds of
> > warnings. Does someone have a better idea than the attached?
>
> The bit added by commit a56e7b660 is still there in
> src/backend/jit/llvm/Makefile:
>
> +# LLVM 14 produces deprecation warnings. We'll need to make some changes
> +# before the relevant functions are removed, but for now silence the warnings.
> +ifeq ($(GCC), yes)
> +LLVM_CFLAGS += -Wno-deprecated-declarations
> +endif
>
> Surely we don't need this anymore? I tried removing it locally
> and didn't see any such warnings (with Red Hat's llvm 20.1.8).
Yeah. We should just delete these obsolete lines in 18 and master.
For older branches, I think it should be enough to update the comment
in 14-17, as attached. We could work harder and suppress the warnings
only for LLVM 14 and 15 specifically in PostgreSQL 14-17, but it seems
like the main point is surely to have *something* watching out for new
warnings that are added in future LLVM versions, and we'll get that
from the newer branches.
Attachments:
[application/octet-stream] 0001-jit-Remove-suppression-of-deprecation-warnings.patch (1.8K, 2-0001-jit-Remove-suppression-of-deprecation-warnings.patch)
download | inline diff:
From 7b60f8f385ecdda80a82d6a99df0db4de2b689a3 Mon Sep 17 00:00:00 2001
From: Thomas Munro <[email protected]>
Date: Mon, 29 Dec 2025 18:13:57 +1300
Subject: [PATCH] jit: Remove suppression of deprecation warnings.
REL_18_STABLE and master have commit ee485912, so they always use the
new opaque pointer API. Revert commit a56e7b660 in those branches, so
that we look out for any new deprecation warnings that arrive in future
LLVM versions.
Older branches continued to use functions marked deprecated in LLVM 14
and 15 (but not LLVM 16+), as a precaution against unforeseen
compatibility problems with bitcode already shipped. In those branches,
the comment explaining the warning suppression is updated to explain
that. In theory those branches could apply the warning suppression only
for LLVM 14 and 15 specifically, but that isn't done here.
Backpatch-through: 14
Reported-by: Tom Lane <[email protected]>
Discussion: https://postgr.es/m/1407185.1766682319%40sss.pgh.pa.us
---
src/backend/jit/llvm/Makefile | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/backend/jit/llvm/Makefile b/src/backend/jit/llvm/Makefile
index 68677ba42e1..1af95582ea3 100644
--- a/src/backend/jit/llvm/Makefile
+++ b/src/backend/jit/llvm/Makefile
@@ -22,8 +22,10 @@ endif
PGFILEDESC = "llvmjit - JIT using LLVM"
NAME = llvmjit
-# LLVM 14 produces deprecation warnings. We'll need to make some changes
-# before the relevant functions are removed, but for now silence the warnings.
+# Some functions called in LLVM 14 and LLVM 15 are marked with GCC deprecation
+# attributes. For LLVM 16 and later, we use the newer replacement functions
+# instead, but warnings are suppressed unconditionally. (Note that this is
+# only done in branches before REL_18_STABLE.)
ifeq ($(GCC), yes)
LLVM_CFLAGS += -Wno-deprecated-declarations
endif
--
2.52.0
view thread (15+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: pgsql: Track LLVM 15 changes.
In-Reply-To: <CA+hUKGJwFNH2yTLeWPaUy9Le=AgvEripEAdmyem7naKGGCAFEQ@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox