mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 09:57:41 +00:00
[master] Disable strict aliasing rules for gcc < 4.5
This is a workaround for a GCC bug which affects gcc 4.4 and manifests on RHEL6.3 as a build failure. This fix was okayed on jabber.
This commit is contained in:
parent
de327e342c
commit
0156b3dbb2
@ -182,6 +182,14 @@ AC_SUBST(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
|
||||
if test "X$GXX" = "Xyes"; then
|
||||
CXX_VERSION=`$CXX --version 2> /dev/null | head -1`
|
||||
KEA_CXXFLAGS="$KEA_CXXFLAGS -Wall -Wextra -Wnon-virtual-dtor -Wwrite-strings -Woverloaded-virtual -Wno-sign-compare"
|
||||
# gcc 4.4 would emit warnings about breaking strict aliasing rules.
|
||||
# See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41874
|
||||
CXX_DUMP_VERSION=`$CXX -dumpversion | cut -f1-2 -d.`
|
||||
if test "$CXX_DUMP_VERSION" \< "4.5"; then
|
||||
WARNING_GCC_44_STRICT_ALIASING_CFLAG="-fno-strict-aliasing"
|
||||
fi
|
||||
AC_SUBST(WARNING_GCC_44_STRICT_ALIASING_CFLAG)
|
||||
|
||||
case "$host" in
|
||||
*-solaris*)
|
||||
MULTITHREADING_FLAG=-pthreads
|
||||
|
@ -10,6 +10,13 @@ AM_CXXFLAGS = $(KEA_CXXFLAGS)
|
||||
# But older GCC compilers don't have the flag.
|
||||
AM_CXXFLAGS += $(WARNING_NO_MISSING_FIELD_INITIALIZERS_CFLAG)
|
||||
|
||||
# GCC 4.4 emits warning about breaking strict aliasing rule.
|
||||
# This warning is a result of a GCC bug:
|
||||
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=41874
|
||||
# The warning is raised in the generated code in parser.h.
|
||||
# Disabling the strict aliasing rule suppresses this warning.
|
||||
AM_CXXFLAGS += $(WARNING_GCC_44_STRICT_ALIASING_CFLAG)
|
||||
|
||||
lib_LTLIBRARIES = libkea-eval.la
|
||||
libkea_eval_la_SOURCES =
|
||||
libkea_eval_la_SOURCES += eval_log.cc eval_log.h
|
||||
|
Loading…
x
Reference in New Issue
Block a user