From patchwork Thu Aug 11 23:20:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 658415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3s9PCn6DPxz9s3s for ; Fri, 12 Aug 2016 09:21:24 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=AkPjWp04; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=eoHkScSHOeSxSuGHcspvTjJcBFlj0UkYce1FH6Wk4K+UYRuLi0 C4BnFs3LXcwsBzRoFPlJnLJT76M2vdImAdyZ6j0u7daNWRKTIvahNJq90NhHjH8N 3zwq/eJQ6zLyXq2OE7lVcMqWRylioKN1NsD/cwuiW6eOqb3Hm1qAqeNCw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=7wamHo2HobECJDt3dBE2rrsLJZQ=; b=AkPjWp04ll8BfTdhlUOI MHcDq9K/oZ70Jd4gEHnUhB/vblxVp5080zZNQKy/Ljc1C4lIrxkhCfzt3rSgTZyj XxmVsdqf2NBM8JXAlCj7wKta/CgWL5Do368F8gVs2cA51wTvPP5IJsvMQtzI6e6+ JP7uQ7ah2YsHth/7/rtDPQY= Received: (qmail 118986 invoked by alias); 11 Aug 2016 23:21:16 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 118968 invoked by uid 89); 11 Aug 2016 23:21:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS autolearn=no version=3.3.2 spammy=2016-08-12, 20160812, H*r:Fri, is X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 11 Aug 2016 23:21:05 +0000 Received: from HHMAIL01.hh.imgtec.org (unknown [10.100.10.19]) by Forcepoint Email with ESMTPS id 031EDE5FB910; Fri, 12 Aug 2016 00:20:47 +0100 (IST) Received: from [10.20.78.240] (10.20.78.240) by HHMAIL01.hh.imgtec.org (10.100.10.21) with Microsoft SMTP Server id 14.3.294.0; Fri, 12 Aug 2016 00:20:51 +0100 Date: Fri, 12 Aug 2016 00:20:39 +0100 From: "Maciej W. Rozycki" To: CC: Bernd Edlinger Subject: [PATCH] Indicate minimum in-tree MPFR version handled Message-ID: User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Hi, Commit 235763 removed support for versions of MPFR below 3.1.0 which have a flat directory structure, however it did not introduce any safety check for such an unhandled library version present in the tree. Consequently the system-installed version is silently chosen, which if too old, causes a confusing configuration failure in mpc/ stating a misleading version requirement: checking for MPFR... yes checking for recent GMP... yes checking for recent MPFR... no configure: error: MPFR version >= 2.4.2 required make[1]: *** [configure-mpc] Error 1 I propose the check below to make people's life just a little bit easier and indicate right away that an incorrect version of MPFR has been found in the source tree. This is especially helpful when you just sync your build tree from upstream and may easily miss the updated requirement. I carefully chose to use "handled" rather than "supported" in the message as the commit referred clearly indicates you are on your own with versions of the libraries different from those stated in `download_prerequisites'. 2016-08-12 Maciej W. Rozycki * configure.ac: Check for the minimum in-tree MPFR version handled. * configure: Regenerate. OK to apply? Maciej gcc-mpfr-version.diff Index: gcc/configure =================================================================== --- gcc.orig/configure 2016-08-11 23:23:44.104635061 +0100 +++ gcc/configure 2016-08-11 23:24:02.933019031 +0100 @@ -5566,6 +5566,10 @@ if test "x$with_mpfr_lib" != x; then gmplibs="-L$with_mpfr_lib $gmplibs" fi if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then + # MPFR v3.1.0 moved the sources into a src sub-directory. + if ! test -d ${srcdir}/mpfr/src; then + as_fn_error "Building GCC with MPFR in the source tree is only handled for MPFR 3.1.0+." "$LINENO" 5 + fi gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs" gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc" extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir" Index: gcc/configure.ac =================================================================== --- gcc.orig/configure.ac 2016-08-11 23:23:44.117834819 +0100 +++ gcc/configure.ac 2016-08-11 23:24:00.198745307 +0100 @@ -1546,6 +1546,11 @@ if test "x$with_mpfr_lib" != x; then gmplibs="-L$with_mpfr_lib $gmplibs" fi if test "x$with_mpfr$with_mpfr_include$with_mpfr_lib" = x && test -d ${srcdir}/mpfr; then + # MPFR v3.1.0 moved the sources into a src sub-directory. + if ! test -d ${srcdir}/mpfr/src; then + AC_MSG_ERROR([dnl +Building GCC with MPFR in the source tree is only handled for MPFR 3.1.0+.]) + fi gmplibs='-L$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir $gmplibs" gmpinc='-I$$r/$(HOST_SUBDIR)/mpfr/src -I$$s/mpfr/src '"$gmpinc" extra_mpc_mpfr_configure_flags='--with-mpfr-include=$$s/mpfr/src --with-mpfr-lib=$$r/$(HOST_SUBDIR)/mpfr/src/'"$lt_cv_objdir"