From c1d314a4ab8faf76df552335860f4af32ac495fa Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 20 Jan 2023 10:29:43 +0100 Subject: [PATCH] Fix build against GCC 13 --- ...Explicitly-include-string-header-NFC.patch | 26 +++++++++++++++++++ libomp.spec | 8 +++++- 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 0001-libomp-Explicitly-include-string-header-NFC.patch diff --git a/0001-libomp-Explicitly-include-string-header-NFC.patch b/0001-libomp-Explicitly-include-string-header-NFC.patch new file mode 100644 index 0000000..775002e --- /dev/null +++ b/0001-libomp-Explicitly-include-string-header-NFC.patch @@ -0,0 +1,26 @@ +From f2ddf903f588021507faefec15d360edb1e425e5 Mon Sep 17 00:00:00 2001 +From: Nikita Popov +Date: Fri, 20 Jan 2023 10:11:01 +0100 +Subject: [PATCH] [libomp] Explicitly include header (NFC) + +This is required to build against libstdc++ 13. Debug.h uses +std::stoi() from without explicitly including it. +--- + openmp/libomptarget/include/Debug.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/openmp/libomptarget/include/Debug.h b/openmp/libomptarget/include/Debug.h +index 4e7da8b7d53f..387dfe50659e 100644 +--- a/openmp/libomptarget/include/Debug.h ++++ b/openmp/libomptarget/include/Debug.h +@@ -39,6 +39,7 @@ + + #include + #include ++#include + + /// 32-Bit field data attributes controlling information presented to the user. + enum OpenMPInfoType : uint32_t { +-- +2.39.0 + diff --git a/libomp.spec b/libomp.spec index 6435535..0b42cdf 100644 --- a/libomp.spec +++ b/libomp.spec @@ -14,7 +14,7 @@ Name: libomp Version: %{libomp_version}%{?rc_ver:~rc%{rc_ver}} -Release: 2%{?dist} +Release: 3%{?dist} Summary: OpenMP runtime for clang License: NCSA @@ -25,6 +25,9 @@ Source2: release-keys.asc Source3: run-lit-tests Source4: lit.fedora.cfg.py +# TODO: Not needed with LLVM 16. +Patch1: 0001-libomp-Explicitly-include-string-header-NFC.patch + BuildRequires: clang # For clang-offload-packager BuildRequires: clang-tools-extra @@ -160,6 +163,9 @@ rm -rf %{buildroot}%{_libdir}/libarcher_static.a %{_libexecdir}/tests/libomp/ %changelog +* Fri Jan 20 2023 Nikita Popov - 15.0.7-3 +- Fix build against GCC 13 + * Thu Jan 19 2023 Fedora Release Engineering - 15.0.7-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild