]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
cmake: use -gdwarf-2
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Wed, 6 Jul 2022 11:58:37 +0000 (15:58 +0400)
committerSimon McVittie <smcv@collabora.com>
Mon, 28 Oct 2024 17:20:14 +0000 (17:20 +0000)
GCC 10.2.0 complains on opensuse mingw builds, ex:
disable-crash-handling.c: error: STABS debugging information is obsolete and not supported anymore [-Werror]

According to
https://gitlab.freedesktop.org/dbus/dbus/-/issues/133#note_129599,
-gdwarf-2 is the second best option.

[The gcc 12 in Debian 12 also no longer supports STABS, so this is a
prerequisite for being able to move our CI onto a supported version of
Debian. -smcv]

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
(cherry picked from commit c79d428564f974452b720264065d609281a97132)

CMakeLists.txt

index fc405d2cd4d751ff3bf941e123cb2ef17a438d7b..53405e6d1b8f4d32f18e0fcbbb9f880dadb658ae 100644 (file)
@@ -375,8 +375,8 @@ string(APPEND CMAKE_CXX_FLAGS " ${WARNINGS_CFLAGS}")
 
 # let wine be able to show file and lines in backtrace
 if(DBUS_USE_WINE)
-    string(APPEND CMAKE_C_FLAGS " -gstabs")
-    string(APPEND CMAKE_CXX_FLAGS " -gstabs")
+    string(APPEND CMAKE_C_FLAGS " -gdwarf-2")
+    string(APPEND CMAKE_CXX_FLAGS " -gdwarf-2")
 endif()
 
 if(UNIX AND NOT DBUS_DISABLE_ASSERT)