summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2018-02-05 08:51:56 +0100
committerTim-Philipp Müller <tim@centricular.com>2018-02-05 08:55:05 +0100
commit58043ff62c5116dc7af191c230404e70ebb6d9ff (patch)
tree6f75f5dfa73736a8e2cb450ef0ccc3f7e8fd6065 /configure.ac
parentabd65bfff82796f3734693eb9bf0068a12446e48 (diff)
autotools: use -fno-strict-aliasing where supported
https://bugzilla.gnome.org/show_bug.cgi?id=769183
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 5 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 2ca4c85b..8f1d072f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -969,6 +969,10 @@ else
fi
AC_SUBST([DEPRECATED_CFLAGS])
+dnl disable strict aliasing
+AS_COMPILER_FLAG([-fno-strict-aliasing], [EXTRA_CFLAGS="-fno-strict-aliasing"])
+AC_SUBST(EXTRA_CFLAGS)
+
dnl every flag in GST_OPTION_CFLAGS and GST_OPTION_CXXFLAGS can be overridden
dnl at make time with e.g. make ERROR_CFLAGS=""
GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(ERROR_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(DEPRECATED_CFLAGS)"
@@ -979,7 +983,7 @@ dnl prefer internal headers to already installed ones
dnl also add builddir include for enumtypes and marshal
dnl add GST_OPTION_CFLAGS, but overridable
GST_CFLAGS="$GST_CFLAGS -DGST_USE_UNSTABLE_API"
-GST_CFLAGS="$GST_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CFLAGS)"
+GST_CFLAGS="$GST_CFLAGS $EXTRA_CFLAGS $GLIB_EXTRA_CFLAGS \$(GST_OPTION_CFLAGS)"
AC_SUBST([GST_CFLAGS])
dnl LDFLAGS really should only contain flags, not libs - they get added before