]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
meson: Build with -fno-strict-aliasing if supported
authorSimon McVittie <smcv@collabora.com>
Fri, 15 Jul 2022 09:42:19 +0000 (10:42 +0100)
committerSimon McVittie <smcv@collabora.com>
Fri, 15 Jul 2022 11:22:46 +0000 (12:22 +0100)
We know that dbus is not fully strict-aliasing-compliant. In Autotools
we got this from AX_COMPILER_FLAGS_CFLAGS.

Signed-off-by: Simon McVittie <smcv@collabora.com>
meson.build

index 12064738d42cd2f562e7c07071dcecd66653174e..765a5a33afc4c68e4d5818ceafe705cacc262a5a 100644 (file)
@@ -154,6 +154,11 @@ compile_args = [
     '-D_GNU_SOURCE',
 ]
 
+# dbus makes assumptions about aliasing that Standard C does not guarantee,
+# particularly in DBusString.
+# See https://gitlab.freedesktop.org/dbus/dbus/-/issues/4
+compile_args += ['-fno-strict-aliasing']
+
 if host_os.contains('solaris')
     compile_args += [
         # Solaris' C library apparently needs these runes to be threadsafe...