]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
meson: Build with -fno-common if supported
authorSimon McVittie <smcv@collabora.com>
Fri, 15 Jul 2022 11:18:04 +0000 (12:18 +0100)
committerSimon McVittie <smcv@collabora.com>
Fri, 15 Jul 2022 11:22:56 +0000 (12:22 +0100)
This turns off a poorly-supported feature of older compilers. Even when
using an older compiler, we want to behave more strictly.

The Autotools build already did this.

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

index 765a5a33afc4c68e4d5818ceafe705cacc262a5a..638bbf5fceaf0eda78608b96e88ca6edf63969ab 100644 (file)
@@ -986,6 +986,11 @@ config.set_quoted('DBUS_EXEEXT', exe_ext)
 compile_warnings = []
 compile_warnings_c = []
 
+# -fno-common makes the linker more strict: on some systems the linker
+# is *always* this strict, so we want to behave like that everywhere.
+# We treat this like a warning, since that's basically how we're using it.
+compile_warnings += ['-fno-common']
+
 if cc.get_id() == 'msvc'
   compile_warnings += [
       # once