[PATCHv2 1/2] Require binutils 2.27 or later to build glibc
Lucas A. M. Magalhaes
lamm@linux.ibm.com
Thu Dec 3 14:01:51 GMT 2020
LGTM.
Tested-by: Lucas A. M. Magalhães <lamm@linux.ibm.com>
Quoting Tulio Magno Quites Machado Filho via Libc-alpha (2020-12-02 19:56:01)
> Changes since v1:
>
> - Moved part of the documentation to patch 2/2.
> - Moved the NEWS entry to "Changes to build and runtime requirements:"
>
> ---8<---
>
> Start requiring binutils >= 2.27 instead of 2.25.
> A test for binutils 2.26 is removed from powerpc64le.
>
> Tested on powerpc64le and x86_64.
> ---
> INSTALL | 6 +--
> NEWS | 3 ++
> configure | 6 +--
> configure.ac | 6 +--
> manual/install.texi | 6 +--
> sysdeps/powerpc/powerpc64/le/configure | 64 -----------------------
> sysdeps/powerpc/powerpc64/le/configure.ac | 7 ---
> 7 files changed, 11 insertions(+), 87 deletions(-)
>
> diff --git a/INSTALL b/INSTALL
> index 2b00f80df5..41d4376a41 100644
> --- a/INSTALL
> +++ b/INSTALL
> @@ -482,17 +482,13 @@ build the GNU C Library:
> Check the FAQ for any special compiler issues on particular
> platforms.
>
> - * GNU 'binutils' 2.25 or later
> + * GNU 'binutils' 2.27 or later
>
> You must use GNU 'binutils' (as and ld) to build the GNU C Library.
> No other assembler or linker has the necessary functionality at the
> moment. As of release time, GNU 'binutils' 2.32 is the newest
> verified to work to build the GNU C Library.
>
> - For PowerPC 64-bits little-endian (powerpc64le), 'objcopy' is
> - required to support '--update-section'. This option requires
> - binutils 2.26 or newer.
> -
> ARC architecture needs 'binutils' 2.32 or higher for TLS related
> fixes.
>
> diff --git a/NEWS b/NEWS
> index aa7bbf033b..954c7e0532 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -48,6 +48,9 @@ Deprecated and removed features, and other changes affecting compatibility:
>
> Changes to build and runtime requirements:
>
> +* The minimum GNU Binutils version that can be used to build this version of
> + the GNU C Library is Binutils 2.27.
> +
> * On Linux, the system administrator needs to configure /dev/pts with
> the intended access modes for pseudo-terminals. glibc no longer
> attemps to adjust permissions of terminal devices. The previous glibc
> diff --git a/configure b/configure
> index 4795e721e5..7b01e72e0d 100755
> --- a/configure
> +++ b/configure
> @@ -4514,7 +4514,7 @@ $as_echo "$libc_cv_prog_ld_gnu" >&6; }
> gnu_ld=$libc_cv_prog_ld_gnu
>
>
> -# Accept binutils 2.25 or newer.
> +# Accept binutils 2.27 or newer.
> for ac_prog in $AS
> do
> # Extract the first word of "$ac_prog", so it can be a program name with args.
> @@ -4566,7 +4566,7 @@ $as_echo_n "checking version of $AS... " >&6; }
> ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
> case $ac_prog_version in
> '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
> - 2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
> + 2.1[0-9][0-9]*|2.2[7-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
> ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
> *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
>
> @@ -4696,7 +4696,7 @@ $as_echo_n "checking version of $LD... " >&6; }
> ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
> case $ac_prog_version in
> '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
> - 2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
> + 2.1[0-9][0-9]*|2.2[7-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
> ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
> *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
>
> diff --git a/configure.ac b/configure.ac
> index 93e68fb696..6bc98e9ab1 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -958,10 +958,10 @@ AC_PROG_LN_S
>
> LIBC_PROG_BINUTILS
>
> -# Accept binutils 2.25 or newer.
> +# Accept binutils 2.27 or newer.
> AC_CHECK_PROG_VER(AS, $AS, --version,
> [GNU assembler.* \([0-9]*\.[0-9.]*\)],
> - [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
> + [2.1[0-9][0-9]*|2.2[7-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
> AS=: critic_missing="$critic_missing as")
>
> if test -n "`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"; then
> @@ -973,7 +973,7 @@ if test -n "`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"; then
> else
> AC_CHECK_PROG_VER(LD, $LD, --version,
> [GNU ld.* \([0-9][0-9]*\.[0-9.]*\)],
> - [2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
> + [2.1[0-9][0-9]*|2.2[7-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
> LD=: critic_missing="$critic_missing GNU ld")
> fi
>
> diff --git a/manual/install.texi b/manual/install.texi
> index 2e164476d5..0594b13bcc 100644
> --- a/manual/install.texi
> +++ b/manual/install.texi
> @@ -523,17 +523,13 @@ You can use whatever compiler you like to compile programs that use
> Check the FAQ for any special compiler issues on particular platforms.
>
> @item
> -GNU @code{binutils} 2.25 or later
> +GNU @code{binutils} 2.27 or later
>
> You must use GNU @code{binutils} (as and ld) to build @theglibc{}.
> No other assembler or linker has the necessary functionality at the
> moment. As of release time, GNU @code{binutils} 2.32 is the newest
> verified to work to build @theglibc{}.
>
> -For PowerPC 64-bits little-endian (powerpc64le), @command{objcopy} is required
> -to support @option{--update-section}. This option requires binutils 2.26 or
> -newer.
> -
> ARC architecture needs @code{binutils} 2.32 or higher for TLS related fixes.
>
> @item
> diff --git a/sysdeps/powerpc/powerpc64/le/configure b/sysdeps/powerpc/powerpc64/le/configure
> index 98a4889945..cd48cd9661 100644
> --- a/sysdeps/powerpc/powerpc64/le/configure
> +++ b/sysdeps/powerpc/powerpc64/le/configure
> @@ -117,68 +117,4 @@ if test "$libc_cv_compiler_powerpc64le_ldbl128_mabi" == "no"; then :
> critic_missing="$critic_missing The compiler must support -mabi=ieeelongdouble and -mlongdouble simultaneously."
> fi
>
> -for ac_prog in $OBJCOPY
> -do
> - # Extract the first word of "$ac_prog", so it can be a program name with args.
> -set dummy $ac_prog; ac_word=$2
> -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
> -$as_echo_n "checking for $ac_word... " >&6; }
> -if ${ac_cv_prog_OBJCOPY+:} false; then :
> - $as_echo_n "(cached) " >&6
> -else
> - if test -n "$OBJCOPY"; then
> - ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
> -else
> -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
> -for as_dir in $PATH
> -do
> - IFS=$as_save_IFS
> - test -z "$as_dir" && as_dir=.
> - for ac_exec_ext in '' $ac_executable_extensions; do
> - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
> - ac_cv_prog_OBJCOPY="$ac_prog"
> - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
> - break 2
> - fi
> -done
> - done
> -IFS=$as_save_IFS
> -
> -fi
> -fi
> -OBJCOPY=$ac_cv_prog_OBJCOPY
> -if test -n "$OBJCOPY"; then
> - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
> -$as_echo "$OBJCOPY" >&6; }
> -else
> - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
> -$as_echo "no" >&6; }
> -fi
> -
> -
> - test -n "$OBJCOPY" && break
> -done
> -
> -if test -z "$OBJCOPY"; then
> - ac_verc_fail=yes
> -else
> - # Found it, now check the version.
> - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $OBJCOPY" >&5
> -$as_echo_n "checking version of $OBJCOPY... " >&6; }
> - ac_prog_version=`$OBJCOPY --version 2>&1 | sed -n 's/^.*GNU objcopy.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
> - case $ac_prog_version in
> - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
> - 2.1[0-9][0-9]*|2.2[6-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*)
> - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
> - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
> -
> - esac
> - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5
> -$as_echo "$ac_prog_version" >&6; }
> -fi
> -if test $ac_verc_fail = yes; then
> - AS=: critic_missing="$critic_missing objcopy >= 2.26 is required on powerpc64le"
> -fi
> -
> -
> test -n "$critic_missing" && as_fn_error $? "*** $critic_missing" "$LINENO" 5
> diff --git a/sysdeps/powerpc/powerpc64/le/configure.ac b/sysdeps/powerpc/powerpc64/le/configure.ac
> index 769c06709e..b616bf95e3 100644
> --- a/sysdeps/powerpc/powerpc64/le/configure.ac
> +++ b/sysdeps/powerpc/powerpc64/le/configure.ac
> @@ -66,11 +66,4 @@ CFLAGS="$save_CFLAGS"])
> AS_IF([test "$libc_cv_compiler_powerpc64le_ldbl128_mabi" == "no"],
> [critic_missing="$critic_missing The compiler must support -mabi=ieeelongdouble and -mlongdouble simultaneously."])
>
> -dnl objcopy (binutils) 2.26 or newer required to support the --update-section
> -dnl feature for fixing up .gnu.attribute section with IEEE ldbl.
> -AC_CHECK_PROG_VER(OBJCOPY, $OBJCOPY, --version,
> - [GNU objcopy.* \([0-9]*\.[0-9.]*\)],
> - [2.1[0-9][0-9]*|2.2[6-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*],
> - AS=: critic_missing="$critic_missing objcopy >= 2.26 is required on powerpc64le")
> -
> test -n "$critic_missing" && AC_MSG_ERROR([*** $critic_missing])
> --
> 2.25.4
>
More information about the Libc-alpha
mailing list