Fix build against GCC 13

This commit is contained in:
Nikita Popov 2023-01-20 10:29:43 +01:00
parent dcbf8dbbf2
commit c1d314a4ab
2 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,26 @@
From f2ddf903f588021507faefec15d360edb1e425e5 Mon Sep 17 00:00:00 2001
From: Nikita Popov <npopov@redhat.com>
Date: Fri, 20 Jan 2023 10:11:01 +0100
Subject: [PATCH] [libomp] Explicitly include <string> header (NFC)
This is required to build against libstdc++ 13. Debug.h uses
std::stoi() from <string> 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 <atomic>
#include <mutex>
+#include <string>
/// 32-Bit field data attributes controlling information presented to the user.
enum OpenMPInfoType : uint32_t {
--
2.39.0

View file

@ -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 <npopov@redhat.com> - 15.0.7-3
- Fix build against GCC 13
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 15.0.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild