mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
build: Enable -fno-strict-aliasing
GLib makes various assumptions about aliasing throughout its codebase, and compiling with -fstrict-aliasing has been demonstrated to cause problems (for example, bug #791622). Explicitly disable strict aliasing as a result. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
97d24b93ab
commit
ade324f6fa
@ -2630,6 +2630,14 @@ AS_IF([ test "x$use_gcov" = "xyes"], [
|
||||
LDFLAGS="$LDFLAGS -lgcov"
|
||||
])
|
||||
|
||||
dnl *******************************
|
||||
dnl *** Disable strict aliasing ***
|
||||
dnl *******************************
|
||||
dnl See https://bugzilla.gnome.org/show_bug.cgi?id=791622
|
||||
AS_IF([test "${GCC}" = "yes"],[
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
])
|
||||
|
||||
dnl ******************************
|
||||
dnl *** output the whole stuff ***
|
||||
dnl ******************************
|
||||
|
@ -63,6 +63,10 @@ glib_pkgconfigreldir = join_paths(glib_libdir, 'pkgconfig')
|
||||
|
||||
add_project_arguments('-D_GNU_SOURCE', language: 'c')
|
||||
|
||||
# Disable strict aliasing;
|
||||
# see https://bugzilla.gnome.org/show_bug.cgi?id=791622
|
||||
add_project_arguments('-fno-strict-aliasing', language: 'c')
|
||||
|
||||
########################
|
||||
# Configuration begins #
|
||||
########################
|
||||
|
Loading…
Reference in New Issue
Block a user