From 04615263c73a6db44daa2e39ae20c95d5311b9c2 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Tue, 24 Sep 2019 18:39:23 -0400 Subject: configure: Drop GccLT46 GCC 4.6 was released 7 years ago. I think we can finally assume that it's available. This is a simplification prompted by #15742. --- aclocal.m4 | 7 ++----- mk/config.mk.in | 1 - mk/warnings.mk | 2 -- rts/ghc.mk | 3 --- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/aclocal.m4 b/aclocal.m4 index b6e72cc4ad..aea0d64886 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1322,18 +1322,15 @@ AC_DEFUN([FP_GCC_VERSION], [ then AC_MSG_ERROR([gcc is required]) fi - GccLT46=NO AC_CACHE_CHECK([version of gcc], [fp_cv_gcc_version], [ # Be sure only to look at the first occurrence of the "version " string; # Some Apple compilers emit multiple messages containing this string. fp_cv_gcc_version="`$CC -v 2>&1 | sed -n -e '1,/version /s/.*version [[^0-9]]*\([[0-9.]]*\).*/\1/p'`" - FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [4.4], - [AC_MSG_ERROR([Need at least gcc version 4.4 (4.7+ recommended)])]) - FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [4.6], GccLT46=YES) + FP_COMPARE_VERSIONS([$fp_cv_gcc_version], [-lt], [4.6], + [AC_MSG_ERROR([Need at least gcc version 4.6 (4.7+ recommended)])]) ]) AC_SUBST([GccVersion], [$fp_cv_gcc_version]) - AC_SUBST(GccLT46) ])# FP_GCC_VERSION dnl Check to see if the C compiler is clang or llvm-gcc diff --git a/mk/config.mk.in b/mk/config.mk.in index 05ad6ad199..cd85c65189 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -526,7 +526,6 @@ GccVersion = @GccVersion@ # TargetPlatformFull retains the string passed to configure so we have it in # the necessary format to pass to libffi's configure. TargetPlatformFull = @TargetPlatformFull@ -GccLT46 = @GccLT46@ # Do we have a C compiler using an LLVM back end? CcLlvmBackend = @CcLlvmBackend@ diff --git a/mk/warnings.mk b/mk/warnings.mk index cee408d061..e2116a332a 100644 --- a/mk/warnings.mk +++ b/mk/warnings.mk @@ -21,12 +21,10 @@ ifneq "$(CcLlvmBackend)" "YES" # Debian doesn't turn -Werror=unused-but-set-variable on by default, so # we turn it on explicitly for consistency with other users -ifeq "$(GccLT46)" "NO" # Never set the flag on Windows as the host gcc may be too old. ifneq "$(HostOS_CPP)" "mingw32" SRC_CC_WARNING_OPTS += -Werror=unused-but-set-variable endif -endif # Suppress the warning about __sync_fetch_and_nand (#9678). libraries/ghc-prim/cbits/atomic_CC_OPTS += -Wno-sync-nand diff --git a/rts/ghc.mk b/rts/ghc.mk index 59d5994147..25a1561814 100644 --- a/rts/ghc.mk +++ b/rts/ghc.mk @@ -337,9 +337,6 @@ WARNING_OPTS += -Wpointer-arith WARNING_OPTS += -Wmissing-noreturn WARNING_OPTS += -Wnested-externs WARNING_OPTS += -Wredundant-decls -ifeq "$(GccLT46)" "NO" -WARNING_OPTS += -Wundef -endif # Some gccs annoyingly enable this archaic specimen by default WARNING_OPTS += -Wno-aggregate-return -- cgit v1.2.1