Browse Source

Fix build of glibc 2.29 on systems with obsolete host programs

- Force building make as a companion tool if host make is older than
4.0 (CentOS 7 currently has 3.82)
- Disable 2.29 as a choice if host python is older than 3.4
(CentOS 7 has 2.6 unless python from EPEL is installed)
- Python2 emits its version information to STDERR. Ugh.

While there, also use the detected host Python for GDB configuration.

Signed-off-by: Alexey Neyman <stilor@att.net>
dev-linux
Alexey Neyman 3 years ago
parent
commit
862c35457d
  1. 7
      config/comp_tools/make.in
  2. 9
      config/configure.in.in
  3. 17
      config/libc/glibc.in
  4. 22
      configure.ac
  5. 4
      m4/ctng_version_check.m4
  6. 2
      packages/glibc/package.desc
  7. 1
      packages/make/package.desc
  8. 1
      paths.sh.in
  9. 6
      scripts/build/companion_tools/050-make.sh
  10. 15
      scripts/build/debug/300-gdb.sh

7
config/comp_tools/make.in

@ -3,6 +3,7 @@
## default y if !CONFIGURE_has_make_3_81_or_newer
config MAKE_GMAKE_SYMLINK
bool
prompt "Add gmake symlink to companion gnu/make"
depends on COMP_TOOLS_MAKE
bool "Create 'gmake' symlink"
config MAKE_GNUMAKE_SYMLINK
bool "Create 'gnumake' symlink"

9
config/configure.in.in

@ -15,6 +15,9 @@ config CONFIGURE_has_curl
config CONFIGURE_has_make_3_81_or_newer
@KCONFIG_make_3_81_or_newer@
config CONFIGURE_has_make_4_0_or_newer
@KCONFIG_make_4_0_or_newer@
config CONFIGURE_has_libtool_2_4_or_newer
@KCONFIG_libtool_2_4_or_newer@
@ -33,6 +36,12 @@ config CONFIGURE_has_automake_1_15_or_newer
config CONFIGURE_has_gnu_m4_1_4_12_or_newer
@KCONFIG_gnu_m4_1_4_12_or_newer@
config CONFIGURE_has_python_3_4_or_newer
@KCONFIG_python_3_4_or_newer@
config CONFIGURE_has_python
@KCONFIG_python@
config CONFIGURE_has_dtc
@KCONFIG_dtc@

17
config/libc/glibc.in

@ -23,8 +23,8 @@ endif
# Glibc has some dependencies on the kernel headers:
config GLIBC_DEP_KERNEL_HEADERS_VERSION
def_bool y
select LINUX_REQUIRE_3_2_or_later if GLIBC_2_24_or_later
def_bool y
select LINUX_REQUIRE_3_2_or_later if GLIBC_2_24_or_later
# Glibc 2.26 requires at least binutils 2.25.
# Also, binutils 2.30 fail while compiling aarch64 glibc; fixed in 2.27
@ -35,6 +35,19 @@ config GLIBC_DEP_BINUTILS
select BINUTILS_REQUIRE_2_25_or_later if GLIBC_2_26_or_later
select BINUTILS_REQUIRE_older_than_2_30 if GLIBC_older_than_2_26 && ARCH_ARM && ARCH_64
# Glibc 2.29 now requires Python 3.4 or later, and make 4.0 or later. Ensure
# we build 'make' as a companion tool if host's make isn't new enough.
config GLIBC_DEP_PYTHON
def_bool y
select GLIBC_REQUIRE_older_than_2_29 if !CONFIGURE_has_python_3_4_or_newer
config GLIBC_DEP_MAKE_4_0
def_bool y
depends on GLIBC_2_29_or_later && !CONFIGURE_has_make_4_0_or_newer
select COMP_TOOLS_MAKE
select MAKE_REQUIRE_4_0_or_later
select MAKE_GNUMAKE_SYMLINK # Override old host make in .build/tools/bin
config GLIBC_DEP_GCC
def_bool y
select GCC_REQUIRE_4_9_or_later if GLIBC_2_26_or_later

22
configure.ac

@ -182,6 +182,13 @@ CTNG_PROG_VERSION_REQ_ANY([MAKE],
[^GNU Make (3\.8[1-9]|3\.9[0-9]|[4-9]\.)],
[make_3_81_or_newer])
CTNG_PROG_VERSION_REQ_ANY([MAKE],
[GNU make >= 4.0],
[make],
[gmake make],
[^GNU Make [4-9]\.],
[make_4_0_or_newer])
# Check other companion tools that we may or may not build.
CTNG_PROG_VERSION_REQ_ANY([LIBTOOL],
[GNU libtool >= 2.4],
@ -225,6 +232,21 @@ CTNG_PROG_VERSION([M4],
[\(GNU M4\) ([2-9]\.|1\.[5-9]|1\.[1-4][0-9]|1\.4\.[2-9][0-9]|1\.4\.1[2-9])],
[gnu_m4_1_4_12_or_newer])
CTNG_PROG_VERSION([PYTHON],
[Python],
[python],
[python37 python3.7 python36 python3.6 python35 python3.5 python34 python3.4 python33 python3.3 python32 python3.2 python31 python3.1 python3 python27 python2.7 python26 python2.6 python2 python],
[^Python [23]\.],
[python])
CTNG_PROG_VERSION([PYTHON],
[Python >= 3.4],
[python],
[python37 python3.7 python36 python3.6 python35 python3.5 python34 python3.4 python3 python],
[^Python 3\.([4-9]|[1-9][0-9]+)\.],
[python_3_4_or_newer])
AC_SUBST([kconfig_options])
AC_CHECK_PROGS([dtc], [dtc])

4
m4/ctng_version_check.m4

@ -18,7 +18,7 @@ AC_DEFUN([CTNG_PROG_VERSION],
[ac_cv_path_$1="$$1"
CTNG_PATH_ABSNAME([ac_cv_path_$1])
CTNG_MSG_LOG_ENVVAR([ac_cv_path_$1])
ver=$(eval $ac_cv_path_$1 --version 2>/dev/null)
ver=$(eval $ac_cv_path_$1 --version 2>&1)
CTNG_MSG_LOG([looking for '[$5]' regexp in])
CTNG_MSG_LOG_ENVVAR([ver], [version info for $ac_cv_path_$1])
ver=$(AS_ECHO(["$ver"]) | $EGREP '[$5]')
@ -26,7 +26,7 @@ AC_DEFUN([CTNG_PROG_VERSION],
[AC_CACHE_CHECK([for $3], [ac_cv_path_$1],
[AC_PATH_PROGS_FEATURE_CHECK([$1], [$4],
[CTNG_MSG_LOG_ENVVAR([ac_path_$1], [checking $1 at])
ver=$($ac_path_$1 --version 2>/dev/null)
ver=$($ac_path_$1 --version 2>&1)
CTNG_MSG_LOG([looking for '[$5]' regexp in])
CTNG_MSG_LOG_ENVVAR([ver], [version info])
ver=$(AS_ECHO(["$ver"]) | $EGREP '[$5]')

2
packages/glibc/package.desc

@ -3,6 +3,6 @@ repository='git git://sourceware.org/git/glibc.git'
mirrors='$(CT_Mirrors GNU glibc)'
# Cannot use MAJOR.MINOR as the releant part because of 2.12: 2.12.2 was the most recent
# bugfix release, but it didn't have glibc-ports released alongside it.
milestones='2.14 2.17 2.20 2.23 2.24 2.25 2.26 2.27'
milestones='2.14 2.17 2.20 2.23 2.24 2.25 2.26 2.27 2.29'
archive_formats='.tar.xz .tar.bz2 .tar.gz'
signature_format='packed/.sig'

1
packages/make/package.desc

@ -4,3 +4,4 @@ mirrors='$(CT_Mirrors GNU make)'
relevantpattern='*.*|.'
archive_formats='.tar.bz2 .tar.gz'
signature_format='packed/.sig'
milestones='4.0'

1
paths.sh.in

@ -6,6 +6,7 @@ export grep="@GREP@"
export gmake="@MAKE@"
export gnumake="@MAKE@"
export make="@MAKE@"
export python="@PYTHON@"
export sed="@SED@"
export libtool="@LIBTOOL@"
export libtoolize="@LIBTOOLIZE@"

6
scripts/build/companion_tools/050-make.sh

@ -23,6 +23,9 @@ do_companion_tools_make_for_build()
if [ "${CT_MAKE_GMAKE_SYMLINK}" = "y" ]; then
CT_DoExecLog ALL ln -sv make "${CT_BUILD_COMPTOOLS_DIR}/bin/gmake"
fi
if [ "${CT_MAKE_GNUMAKE_SYMLINK}" = "y" ]; then
CT_DoExecLog ALL ln -sv make "${CT_BUILD_COMPTOOLS_DIR}/bin/gnumake"
fi
CT_EndStep
}
@ -39,6 +42,9 @@ do_companion_tools_make_for_host()
if [ "${CT_MAKE_GMAKE_SYMLINK}" = "y" ]; then
CT_DoExecLog ALL ln -sv make "${CT_PREFIX_DIR}/bin/gmake"
fi
if [ "${CT_MAKE_GNUMAKE_SYMLINK}" = "y" ]; then
CT_DoExecLog ALL ln -sv make "${CT_PREFIX_DIR}/bin/gnumake"
fi
CT_EndStep
}

15
scripts/build/debug/300-gdb.sh

@ -64,15 +64,12 @@ do_debug_gdb_build() {
if [ "${CT_GDB_CROSS_PYTHON}" = "y" ]; then
if [ -z "${CT_GDB_CROSS_PYTHON_BINARY}" ]; then
for p in python python3 python2; do
_p=$( which "${p}" || true )
if [ -n "${_p}" ]; then
cross_extra_config+=("--with-python=${_p}")
break
fi
done
if [ -z "${_p}" ]; then
CT_Abort "Python support requested in cross-gdb, but Python not found. Set CT_GDB_CROSS_PYTHON_BINARY in your config."
if [ "${CT_CANADIAN}" = "y" -o "${CT_CROSS_NATIVE}" = "y" ]; then
CT_Abort "For canadian build, Python wrapper runnable on the build machine must be provided. Set CT_GDB_CROSS_PYTHON_BINARY."
elif [ "${CT_CONFIGURE_has_python}" = "y" ]; then
cross_extra_config+=("--with-python=${python}")
else
CT_Abort "Python support requested in GDB, but Python not found. Set CT_GDB_CROSS_PYTHON_BINARY."
fi
else
cross_extra_config+=("--with-python=${CT_GDB_CROSS_PYTHON_BINARY}")

Loading…
Cancel
Save