From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118932 invoked by alias); 2 May 2017 00:09:39 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 118815 invoked by uid 89); 2 May 2017 00:09:38 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY,NO_DNS_FOR_FROM,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=Gold, long, HContent-Transfer-Encoding:8bit X-HELO: mga02.intel.com Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 02 May 2017 00:09:37 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 May 2017 17:09:38 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([172.25.70.218]) by orsmga002.jf.intel.com with ESMTP; 01 May 2017 17:09:37 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 1000) id CD9C22001B3; Mon, 1 May 2017 17:09:37 -0700 (PDT) Date: Tue, 02 May 2017 00:09:00 -0000 From: "H.J. Lu" To: binutils@sourceware.org Subject: [PATCH] Gold: Fix mips.cc for GCC 4.2 Message-ID: <20170502000937.GA8165@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.8.0 (2017-02-23) X-SW-Source: 2017-05/txt/msg00013.txt.bz2 GCC 4.2 fails to compile "(uint64_t) 0x800080008000" with error: integer constant is too large for ‘long’ type This patch adds "llu" suffix to 0x800080008000 for GCC 4.2. OK for master? H.J. -- * mips.cc (Mips_relocate_functions): Add "llu" suffix to 0x800080008000. --- gold/mips.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gold/mips.cc b/gold/mips.cc index 4fc160b..5555562 100644 --- a/gold/mips.cc +++ b/gold/mips.cc @@ -5664,7 +5664,7 @@ class Mips_relocate_functions : public Relocate_functions : addend_a); Valtype x = psymval->value(object, addend); - x = ((x + (uint64_t) 0x800080008000) >> 48) & 0xffff; + x = ((x + (uint64_t) 0x800080008000llu) >> 48) & 0xffff; val = Bits<32>::bit_select32(val, x, 0xffff); if (calculate_only) -- 2.9.3