On Tue, Aug 06, 2019 at 12:37:49AM +0200, Robert Scheck wrote: > Hello Ondrej, > > On Mon, 05 Aug 2019, Ondrej Zajicek wrote: > > I think we started to require newer bison (although it should be checked > > by configure and complained there). We aim to be compatible with 5 year > > old systems, but RHEL/CentOS 6 is too old even for that. > > while this is a good pointer indeed, it's unfortunately wrong. Using bison > 3.0.4 (same version like RHEL/CentOS 7 uses) still leads to the same error. > > But following your pointer in general, I figured out that GCC 4.4.x causes > the error, while GCC 4.8.x works. Looks like BIRD depends on a feature from > GCC 4.5 (or newer, I didn't track this down further). Thanks though!
Yes, that is true. We probably should add some checks for that. > > Not sure about that, it works on CentOS 7 in our Gitlab test build. > > > > It seems like our configure script improperly adds -flto even if CFLAGS / > > LDFLAGS are expliclty set, and it is incompatible with your flags. > > Sounds like a bug in the configure script then, may you have a look to it, > please? Fixed, see attached patch. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santi...@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."
commit 8c42205e35e24537122a4c821bd3128d698abf1b Author: Ondrej Zajicek (work) <santi...@crfreenet.org> Date: Tue Aug 6 14:53:02 2019 +0200 Configure: CFLAGS update - add -flto only to default CFLAGS - add -fno-strict-aliasing, -fno-strict-overflow always - remove -Wno-implicit-fallthrough diff --git a/configure.ac b/configure.ac index 14dbcd52..7e8578ab 100644 --- a/configure.ac +++ b/configure.ac @@ -137,27 +137,27 @@ if test "$enable_pthreads" != no ; then fi fi +# This is assumed to be necessary for proper BIRD build +CFLAGS="$CFLAGS -fno-strict-aliasing -fno-strict-overflow" + if test "$bird_cflags_default" = yes ; then BIRD_CHECK_GCC_OPTION([bird_cv_c_option_wno_pointer_sign], [-Wno-pointer-sign], [-Wall]) BIRD_CHECK_GCC_OPTION([bird_cv_c_option_wno_missing_init], [-Wno-missing-field-initializers], [-Wall -Wextra]) - BIRD_CHECK_GCC_OPTION([bird_cv_c_option_fno_strict_aliasing], [-fno-strict-aliasing]) - BIRD_CHECK_GCC_OPTION([bird_cv_c_option_fno_strict_overflow], [-fno-strict-overflow]) + + if test "$enable_debug" = no; then + BIRD_CHECK_LTO + fi + + if test "$bird_cv_c_lto" = yes; then + CFLAGS="$CFLAGS -flto" + LDFLAGS="$LDFLAGS -flto=4" + fi CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -Wno-parentheses" BIRD_ADD_GCC_OPTION([bird_cv_c_option_wno_pointer_sign], [-Wno-pointer-sign]) BIRD_ADD_GCC_OPTION([bird_cv_c_option_wno_missing_init], [-Wno-missing-field-initializers]) - BIRD_ADD_GCC_OPTION([bird_cv_c_option_fno_strict_aliasing], [-fno-strict-aliasing]) - BIRD_ADD_GCC_OPTION([bird_cv_c_option_fno_strict_overflow], [-fno-strict-overflow]) fi -if test "$enable_debug" = no; then - BIRD_CHECK_LTO -fi - -if test "$bird_cv_c_lto" = yes; then - CFLAGS="$CFLAGS -flto" - LDFLAGS="$LDFLAGS -flto=4" -fi AC_MSG_CHECKING([CFLAGS]) AC_MSG_RESULT([$CFLAGS]) @@ -387,9 +387,6 @@ if test "$enable_debug" = yes ; then AC_CHECK_LIB([efence], [malloc]) fi fi -else - BIRD_CHECK_GCC_OPTION([bird_cv_c_option_wno_implicit_fallthrough], [-Wno-implicit-fallthrough]) - BIRD_ADD_GCC_OPTION([bird_cv_c_option_wno_implicit_fallthrough], [-Wno-implicit-fallthrough]) fi CLIENT=birdcl