From 37ac0e8474883ce9202ef4e08b7d9f9f66ea8a5d Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Mon, 14 May 2018 23:47:17 -0700 Subject: Too many fixes need backporting for GCC8... ... so instead, disable -Werror for older versions of glibc. Signed-off-by: Alexey Neyman diff --git a/config/libc/glibc.in b/config/libc/glibc.in index 00fffa7..5916a83 100644 --- a/config/libc/glibc.in +++ b/config/libc/glibc.in @@ -112,12 +112,6 @@ config GLIBC_HAS_OBSOLETE_RPC def_bool y depends on GLIBC_2_14_or_later -# New GCC versions don't like the ifunc implementation in GCC, producing a warning. -# We can either require old GCC for those versions, or disable erroring out on warnings. -config GLIBC_HAS_NEW_IFUNC - def_bool y - depends on GLIBC_2_25_or_later - config GLIBC_EXTRA_CONFIG_ARRAY string prompt "extra config" @@ -326,4 +320,16 @@ config GLIBC_MIN_KERNEL default LINUX_VERSION if GLIBC_KERNEL_VERSION_AS_HEADERS default GLIBC_MIN_KERNEL_VERSION if GLIBC_KERNEL_VERSION_CHOSEN +# All supported versions of glibc build cleanly with GCC7 and earlier. +# GCC8-related fixes were only available in glibc 2.27. +config GLIBC_ENABLE_WERROR + bool "Enable -Werror during the build" + default y if GCC_7_or_older + default y if GCC_8_or_later && GLIBC_2_27_or_later + help + By default, glibc enables strict warning checks during the build. + However, older version of glibc may not build with newer versions + of the compiler than there were available at the time of a glibc + release (because newer compilers typically have better diagnostics). + endif # KERNEL_LINUX diff --git a/packages/glibc/package.desc b/packages/glibc/package.desc index 158e637..ea03e69 100644 --- a/packages/glibc/package.desc +++ b/packages/glibc/package.desc @@ -1,6 +1,6 @@ origin='GNU' repository='git git://sourceware.org/git/glibc.git' mirrors='$(CT_Mirrors GNU glibc)' -milestones='2.14 2.17 2.20 2.23 2.24 2.25 2.26' +milestones='2.14 2.17 2.20 2.23 2.24 2.26 2.27' archive_formats='.tar.xz .tar.bz2 .tar.gz' signature_format='packed/.sig' diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 4b1c688..2f257b5 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -171,6 +171,7 @@ do_libc_backend_once() { *) extra_config+=("--enable-add-ons=$(do_libc_add_ons_list ,)");; esac + [ "${CT_GLIBC_ENABLE_WERROR}" != "y" ] && extra_config+=("--disable-werror") [ -n "${CT_PKGVERSION}" ] && extra_config+=("--with-pkgversion=${CT_PKGVERSION}") [ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}") @@ -200,13 +201,6 @@ do_libc_backend_once() { glibc_cflags+=" ${CT_GLIBC_EXTRA_CFLAGS}" glibc_cflags+=" ${multi_flags}" - # Before 2.25, glibc didn't use GCC's ifunc attribute, instead creating - # the resolvers through some clever assembly. This had the resolver function - # aliased with an incompatible type, and GCC8 now complains about it. - if [ "${CT_GLIBC_HAS_NEW_IFUNC}" != "y" ]; then - glibc_cflags+=" -Wno-error=attribute-alias" - fi - # Analyze the resulting options for any extra configure switches to throw in. for opt in ${glibc_cflags}; do case ${opt} in -- cgit v0.10.2-6-g49f6