From: Vladimír Čunát Date: Mon, 23 Mar 2020 10:37:28 +0000 (+0100) Subject: meson.build: compile with -fno-strict-aliasing X-Git-Tag: v5.1.0~27^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cad901547b53cd94011350e86a9d219d40a347bf;p=thirdparty%2Fknot-resolver.git meson.build: compile with -fno-strict-aliasing I tested that older compilers don't refuse this option: - gcc 4.8 (as that's the default in CentOS 7) - llvm 3.8 (year 2016 is enough, I hope) --- diff --git a/meson.build b/meson.build index bddbe49ec..aa961aa70 100644 --- a/meson.build +++ b/meson.build @@ -118,6 +118,14 @@ add_project_arguments( '-Werror=implicit-function-declaration', # Probably messed up includes; implicit functions are evil! '-fvisibility=hidden', '-DHAVE_ASPRINTF=' + have_asprintf.to_int().to_string(), + + # libuv handles have aliasing problems; see: + # https://github.com/libuv/libuv/pull/2588/files#diff-04c6e90faac2675aa89e2176d2eec7d8 + # https://github.com/libuv/libuv/issues/1230#issuecomment-569030944 + # Performance impact in our case seems OK: + # https://gitlab.labs.nic.cz/knot/knot-resolver/-/merge_requests/962#note_147407 + '-fno-strict-aliasing', + language: 'c', )