Commit 5d7c9cc1 authored by Sebastian Dröge's avatar Sebastian Dröge

Only add -fno-strict-aliasing to ERROR_CXXFLAGS with older GLib versions

parent fa2396bd
...@@ -114,10 +114,15 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS], ...@@ -114,10 +114,15 @@ AC_DEFUN([AG_GST_SET_ERROR_CXXFLAGS],
dnl add exceptions dnl add exceptions
for f in '-Wno-non-virtual-dtor' '-fno-strict-aliasing' AS_CXX_COMPILER_FLAG([-Wno-non-virtual-dtor], ERROR_CXXFLAGS="$ERROR_CXXFLAGS -Wno-non-virtual-dtor")
AS_CXX_COMPILER_FLAG([$f], ERROR_CXXFLAGS="$ERROR_CXXFLAGS $f") dnl Add -fno-strict-aliasing for GLib versions before 2.19.8
done dnl as before G_LOCK and friends caused strict aliasing compiler
dnl warnings.
PKG_CHECK_EXISTS([glib-2.0 < 2.19.8], [
ERROR_CXXFLAGS="$ERROR_CXXFLAGS -fno-strict-aliasing")
else else
dnl if -Werror isn't suported, try -errwarn=%all dnl if -Werror isn't suported, try -errwarn=%all
AS_CXX_COMPILER_FLAG([-errwarn=%all], errwarnall=yes, errwarnall=no) AS_CXX_COMPILER_FLAG([-errwarn=%all], errwarnall=yes, errwarnall=no)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment