- Add lldb-swig-4.1.0-build-fix.patch: Fix build with Swig 4.1.0.
OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm13?expand=0&rev=30
This commit is contained in:
parent
ebe220d18e
commit
8187ea6947
68
lldb-swig-4.1.0-build-fix.patch
Normal file
68
lldb-swig-4.1.0-build-fix.patch
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
From 81fc5f7909a4ef5a8d4b5da2a10f77f7cb01ba63 Mon Sep 17 00:00:00 2001
|
||||||
|
From: serge-sans-paille <sguelton@redhat.com>
|
||||||
|
Date: Thu, 29 Sep 2022 21:48:38 +0200
|
||||||
|
Subject: [PATCH] [lldb] Get rid of __STDC_LIMIT_MACROS and
|
||||||
|
__STDC_CONSTANT_MACROS
|
||||||
|
|
||||||
|
C++11 made the use of these macro obsolete, see https://sourceware.org/bugzilla/show_bug.cgi?id=15366
|
||||||
|
|
||||||
|
As a side effect this prevents https://github.com/swig/swig/issues/2193.
|
||||||
|
|
||||||
|
Differential Revision: https://reviews.llvm.org/D134877
|
||||||
|
---
|
||||||
|
lldb/bindings/CMakeLists.txt | 2 --
|
||||||
|
lldb/bindings/interfaces.swig | 3 ---
|
||||||
|
2 files changed, 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/lldb/bindings/CMakeLists.txt b/lldb/bindings/CMakeLists.txt
|
||||||
|
index c8aa0bcf96817..9eed2f1e62999 100644
|
||||||
|
--- a/lldb/bindings/CMakeLists.txt
|
||||||
|
+++ b/lldb/bindings/CMakeLists.txt
|
||||||
|
@@ -26,8 +26,6 @@ set(SWIG_COMMON_FLAGS
|
||||||
|
-features autodoc
|
||||||
|
-I${LLDB_SOURCE_DIR}/include
|
||||||
|
-I${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
- -D__STDC_LIMIT_MACROS
|
||||||
|
- -D__STDC_CONSTANT_MACROS
|
||||||
|
${DARWIN_EXTRAS}
|
||||||
|
)
|
||||||
|
|
||||||
|
diff --git a/lldb/bindings/interfaces.swig b/lldb/bindings/interfaces.swig
|
||||||
|
index fb75513a0df1b..d984711bbd8a2 100644
|
||||||
|
--- a/lldb/bindings/interfaces.swig
|
||||||
|
+++ b/lldb/bindings/interfaces.swig
|
||||||
|
@@ -1,8 +1,5 @@
|
||||||
|
/* Various liblldb typedefs that SWIG needs to know about. */
|
||||||
|
#define __extension__ /* Undefine GCC keyword to make Swig happy when processing glibc's stdint.h. */
|
||||||
|
-/* The ISO C99 standard specifies that in C++ implementations limit macros such
|
||||||
|
- as INT32_MAX should only be defined if __STDC_LIMIT_MACROS is. */
|
||||||
|
-#define __STDC_LIMIT_MACROS
|
||||||
|
%include "stdint.i"
|
||||||
|
|
||||||
|
%include "lldb/lldb-defines.h"
|
||||||
|
From f0a25fe0b746f56295d5c02116ba28d2f965c175 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jitka Plesnikova <jplesnik@redhat.com>
|
||||||
|
Date: Wed, 21 Sep 2022 11:42:46 +0200
|
||||||
|
Subject: [PATCH] [lldb] Fix 'error: non-const lvalue...' caused by SWIG 4.1.0
|
||||||
|
|
||||||
|
Fix the failure caused by change in SwigValueWraper for C++11 and later
|
||||||
|
for improved move semantics in SWIG commit.
|
||||||
|
|
||||||
|
https://github.com/swig/swig/commit/d1055f4b3d51cb8060893f8036846ac743302dab
|
||||||
|
---
|
||||||
|
lldb/bindings/python/python-typemaps.swig | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/lldb/bindings/python/python-typemaps.swig b/lldb/bindings/python/python-typemaps.swig
|
||||||
|
index 203be803d2ebd..11f68d59ae7be 100644
|
||||||
|
--- a/lldb/bindings/python/python-typemaps.swig
|
||||||
|
+++ b/lldb/bindings/python/python-typemaps.swig
|
||||||
|
@@ -435,7 +435,7 @@ template <> bool SetNumberFromPyObject<double>(double &number, PyObject *obj) {
|
||||||
|
|
||||||
|
%typemap(out) lldb::FileSP {
|
||||||
|
$result = nullptr;
|
||||||
|
- lldb::FileSP &sp = $1;
|
||||||
|
+ const lldb::FileSP &sp = $1;
|
||||||
|
if (sp) {
|
||||||
|
PythonFile pyfile = unwrapOrSetPythonException(PythonFile::FromFile(*sp));
|
||||||
|
if (!pyfile.IsValid())
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Oct 30 14:09:39 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
- Add lldb-swig-4.1.0-build-fix.patch: Fix build with Swig 4.1.0.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Sep 3 15:15:10 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
Sat Sep 3 15:15:10 UTC 2022 - Aaron Puchert <aaronpuchert@alice-dsl.net>
|
||||||
|
|
||||||
|
@ -164,6 +164,8 @@ Patch27: llvm-exegesis-link-dylib.patch
|
|||||||
# Fix lookup of targets in installed CMake files. (boo#1180748, https://reviews.llvm.org/D96670)
|
# Fix lookup of targets in installed CMake files. (boo#1180748, https://reviews.llvm.org/D96670)
|
||||||
Patch33: CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch
|
Patch33: CMake-Look-up-target-subcomponents-in-LLVM_AVAILABLE_LIBS.patch
|
||||||
Patch35: llvm-update-extract-section-script.patch
|
Patch35: llvm-update-extract-section-script.patch
|
||||||
|
# Fix build with Swig 4.1.0: backport of upstream commits 81fc5f7909a4, f0a25fe0b746. (gh#llvm/llvm-project#58018)
|
||||||
|
Patch38: lldb-swig-4.1.0-build-fix.patch
|
||||||
BuildRequires: binutils-devel >= 2.21.90
|
BuildRequires: binutils-devel >= 2.21.90
|
||||||
BuildRequires: cmake >= 3.13.4
|
BuildRequires: cmake >= 3.13.4
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
@ -629,6 +631,7 @@ popd
|
|||||||
%if %{with lldb}
|
%if %{with lldb}
|
||||||
pushd lldb-%{_version}.src
|
pushd lldb-%{_version}.src
|
||||||
%patch11 -p1
|
%patch11 -p1
|
||||||
|
%patch38 -p2
|
||||||
popd
|
popd
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user