autotools: use -fno-strict-aliasing where supported

https://bugzilla.gnome.org/show_bug.cgi?id=769183
This commit is contained in:
Tim-Philipp Müller 2018-02-03 17:56:04 +01:00
parent 08dab770d6
commit ffa4dc4dce
2 changed files with 7 additions and 3 deletions

View file

@ -935,6 +935,10 @@ dnl special warning flags for gst/printf
AS_COMPILER_FLAG([-Wno-format-nonliteral], [PRINTF_CFLAGS="-Wno-format-nonliteral"]) AS_COMPILER_FLAG([-Wno-format-nonliteral], [PRINTF_CFLAGS="-Wno-format-nonliteral"])
AC_SUBST(PRINTF_CFLAGS) AC_SUBST(PRINTF_CFLAGS)
dnl disable strict aliasing
AS_COMPILER_FLAG([-fno-strict-aliasing], [EXTRA_CFLAGS="-fno-strict-aliasing"])
AC_SUBST(EXTRA_CFLAGS)
dnl define correct level for debugging messages dnl define correct level for debugging messages
AG_GST_SET_LEVEL_DEFAULT($GST_GIT) AG_GST_SET_LEVEL_DEFAULT($GST_GIT)
@ -982,8 +986,8 @@ dnl - src and build dirs need to be added because every piece that gets built
dnl will need the GStreamer source and generated headers dnl will need the GStreamer source and generated headers
dnl LIBS: XML doesn't need to be added because we don't explicitly use symbols dnl LIBS: XML doesn't need to be added because we don't explicitly use symbols
dnl from LibXML except for in the core library dnl from LibXML except for in the core library
GST_ALL_CXXFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS \$(GLIB_EXTRA_CFLAGS) $XML_CFLAGS \$(GST_OPTION_CXXFLAGS) \$(ERROR_CXXFLAGS)" GST_ALL_CXXFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS \$(GLIB_EXTRA_CFLAGS) $EXTRA_CFLAGS \$(GST_OPTION_CXXFLAGS) \$(ERROR_CXXFLAGS)"
GST_ALL_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS \$(GLIB_EXTRA_CFLAGS) $XML_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS)" GST_ALL_CFLAGS="-I\$(top_srcdir)/libs -I\$(top_srcdir) -I\$(top_builddir)/libs -I\$(top_builddir) $GLIB_CFLAGS \$(GLIB_EXTRA_CFLAGS) $EXTRA_CFLAGS \$(GST_OPTION_CFLAGS) \$(ERROR_CFLAGS)"
dnl FIXME: check if LTLIBINTL is needed everywhere dnl FIXME: check if LTLIBINTL is needed everywhere
dnl I presume it is given that it contains the symbols that _() stuff maps to dnl I presume it is given that it contains the symbols that _() stuff maps to

View file

@ -14,7 +14,7 @@ AM_CPPFLAGS += $(PRINTF_EXTRA_CFLAGS)
noinst_LTLIBRARIES = libgstprintf.la noinst_LTLIBRARIES = libgstprintf.la
libgstprintf_la_CFLAGS = libgstprintf_la_CFLAGS = $(EXTRA_CFLAGS)
libgstprintf_la_SOURCES = \ libgstprintf_la_SOURCES = \
asnprintf.c \ asnprintf.c \
printf-args.c \ printf-args.c \