From eb96c972d2178bf49bcbe6c10c088c45bd093180 Mon Sep 17 00:00:00 2001 From: "Erik M. Bray" Date: Thu, 19 Jul 2018 07:28:29 +0000 Subject: [PATCH] rather than try to make _clean-broken-gcc explicitly a prerequisite of spkg targets just ensure it is always run/checked in the build/make/install script it also needs to run as a prerequisite of base-toolchain --- build/make/deps | 2 +- build/make/install | 5 +++++ build/pkgs/gcc/dependencies | 2 +- m4/sage_spkg_collect.m4 | 4 ---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/build/make/deps b/build/make/deps index fb9a6e4a031..1968f5518b1 100644 --- a/build/make/deps +++ b/build/make/deps @@ -47,7 +47,7 @@ all-build: toolchain-deps # During the toolchain build, we export SAGE_BUILD_TOOLCHAIN=yes # such that packages can do different things when they are built # as prerequisite of GCC. -base-toolchain: base +base-toolchain: _clean-broken-gcc base env SAGE_BUILD_TOOLCHAIN=yes $(MAKE) toolchain # All targets except for the base packages diff --git a/build/make/install b/build/make/install index 5873cf2dc3f..f0a1fb82508 100755 --- a/build/make/install +++ b/build/make/install @@ -44,6 +44,11 @@ if [ -z "$MAKE" ]; then export MAKE=make fi +# Make the special target _clean-broken-gcc before trying to build any other +# packages. This is necessary if configure detected a broken GCC installed +# in Sage; Trac #25011 +$MAKE _clean-broken-gcc + # If "make" doesn't understand the -q option (although we require # GNU make, which supports it), it should exit with a non-zero status # which is not a problem. diff --git a/build/pkgs/gcc/dependencies b/build/pkgs/gcc/dependencies index fbd8586f0e4..9af2c9534bb 100644 --- a/build/pkgs/gcc/dependencies +++ b/build/pkgs/gcc/dependencies @@ -1,4 +1,4 @@ -_clean-broken-gcc | $(MP_LIBRARY) mpfr mpc zlib xz +| $(MP_LIBRARY) mpfr mpc zlib xz ------------------------------------------------------------------------ NOTE: all dependencies of GCC must be order-only dependencies diff --git a/m4/sage_spkg_collect.m4 b/m4/sage_spkg_collect.m4 index 11123071d1b..beb64d2ffd9 100644 --- a/m4/sage_spkg_collect.m4 +++ b/m4/sage_spkg_collect.m4 @@ -58,10 +58,6 @@ AC_DEFUN_ONCE([SAGE_SPKG_COLLECT], [ # See https://trac.sagemath.org/ticket/24703 if test x$SAGE_INSTALL_GCC = xexists; then SAGE_GCC_DEP='$(SAGE_LOCAL)/bin/gcc' -elif test x$SAGE_INSTALL_GCC = xyes; then - # GCC should be installed *or* there as in existing installation that - # is broken and should be removed. - SAGE_GCC_DEP='_clean-broken-gcc' else SAGE_GCC_DEP='' fi