From b6ccce35e69f1f14da4ed7116c79a2ce43c019b2 Mon Sep 17 00:00:00 2001
From: "Ralf W. Grosse-Kunstleve" <rgrossekunst@nvidia.com>
Date: Tue, 26 Nov 2024 00:07:02 -0800
Subject: [PATCH] Revert "Fix oversight: remove __NVCOMPILER elif branch in
 PYBIND11_BUILD_ABI block."

This reverts commit d412303e727923571bfd9b907809b1d73a045b34.
---
 include/pybind11/conduit/pybind11_platform_abi_id.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/pybind11/conduit/pybind11_platform_abi_id.h b/include/pybind11/conduit/pybind11_platform_abi_id.h
index f1ab740d6..d1f22329a 100644
--- a/include/pybind11/conduit/pybind11_platform_abi_id.h
+++ b/include/pybind11/conduit/pybind11_platform_abi_id.h
@@ -64,9 +64,11 @@
 #                error "Unknown major version for MSC_VER: PLEASE REVISE THIS CODE."
 #            endif
 #        endif
+#    elif defined(__NVCOMPILER)        // NVHPC (PGI-based).
+#        define PYBIND11_BUILD_ABI ""  // TODO: What should be here, to prevent UB?
 #    elif defined(_LIBCPP_ABI_VERSION) // https://libcxx.llvm.org/DesignDocs/ABIVersioning.html
 #        define PYBIND11_BUILD_ABI "_abi" PYBIND11_PLATFORM_ABI_ID_TOSTRING(_LIBCPP_ABI_VERSION)
-#    elif defined(__GXX_ABI_VERSION) // See PR #5439.
+#    elif defined(__GXX_ABI_VERSION)
 #        if __GXX_ABI_VERSION >= 1002 && __GXX_ABI_VERSION < 2000
 #            if !defined(_GLIBCXX_USE_CXX11_ABI)
 #                error "UNEXPECTED: _GLIBCXX_USE_CXX11_ABI not defined: PLEASE REVISE THIS CODE."