From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-il1-x129.google.com (mail-il1-x129.google.com [IPv6:2607:f8b0:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 129E73858CDA for ; Thu, 14 Sep 2023 19:33:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 129E73858CDA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-il1-x129.google.com with SMTP id e9e14a558f8ab-34df008b0cbso4634585ab.1 for ; Thu, 14 Sep 2023 12:33:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1694720009; x=1695324809; darn=sourceware.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=vf3aRs+HcajQOiv1ZS2TqmjIzdqwsjWVUlP08KrYTVQ=; b=IyJqiA6eQpCEfFkAVXCqfsuRV1GkK8c7c6L/avyGtQ266MHWxsE/wzSGDY9x1ZP9kQ KSUQV5h6gUmUEEK4QO3duUtpantT/59ENS3sSWyHe01OuiCKii9opv3tDYFtFQ8rPzwB L2/rX4dnKEsHUE4baeiSyo2dOg69P+ubuWHpPfMIdHqjoz5admLxXlZM8cI4e8CiDKVo R/eEABAeKKnv3mgk2WgtqPs9bahCl2nVLoioeglw2p9uP9N9AVQ9pHy5lJE7P707sjww XnxfUqIyVHe7HO0FkcHIUVnD8xf5fLeWU3L92TU0Vc8WAMrZe9Y1Zx7NVs+yityKRao+ mUbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694720009; x=1695324809; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=vf3aRs+HcajQOiv1ZS2TqmjIzdqwsjWVUlP08KrYTVQ=; b=unNgG1sk0rKmEFwkNACEq4gR/YNJF9BnCgEwIAaoOpJVlUwj9QvuPtp8XJW9tv0H+A AjyHNoSzVgIx44Udj2eAuBpKsNqH0h3EmYSHdEIyu3xT6swGMWSsNrAagm7BRb+TQNJa dLLJJg62xswuPjqOWdaD7y+gvLMHxpFtM6XRmriwtHGNKTRX+cco2PpxKhCn56yhdXPF fhVQ2Jb7nCdUQWTQ5h0+xgs/g5IlDjy8Kr/1L+tTDu4hFaMmT5BcY2byRB259eTwUamW fVWb3f17NnyrxLuBKTVGE1T5J6JRVQSarXWZV7pideTV1UFfkeEVk9HDAlf2Bx8su1nv W7Gg== X-Gm-Message-State: AOJu0YymuuhhnQZ8js6fSA+ZTg+7Fr0wcq8SquQmznKYtIMnevvaC+DC HR7Q2Pneil6Bw/clo6FmDwrU5g== X-Google-Smtp-Source: AGHT+IGaNBhayurZGo+2pAFtiwfENOVEVbj6HzNiXqQAg8UcCBAzL/4fqOIf0/ky/b+9DlNfsNw1sA== X-Received: by 2002:a05:6e02:1b8b:b0:346:7c6d:c667 with SMTP id h11-20020a056e021b8b00b003467c6dc667mr7569576ili.13.1694720009083; Thu, 14 Sep 2023 12:33:29 -0700 (PDT) Received: from murgatroyd (71-211-130-31.hlrn.qwest.net. [71.211.130.31]) by smtp.gmail.com with ESMTPSA id r4-20020a92d984000000b0034cb37f0636sm643052iln.40.2023.09.14.12.33.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 12:33:28 -0700 (PDT) From: Tom Tromey To: Vaseeharan Vinayagamoorthy Cc: Tom Tromey , Simon Marchi , "gdb-patches@sourceware.org" Subject: Re: [PATCH] Specialize std::hash for ptid_t References: <20230911144718.3425981-1-tromey@adacore.com> <99e5e4c7-9530-4eaa-8062-c13abb66b7b2@polymtl.ca> <878r9cllbs.fsf@tromey.com> <8d359fca-6e2a-406e-a99a-d9623cbd37be@polymtl.ca> X-Attribution: Tom Date: Thu, 14 Sep 2023 13:33:27 -0600 In-Reply-To: (Vaseeharan Vinayagamoorthy's message of "Thu, 14 Sep 2023 19:14:17 +0000") Message-ID: <875y4ch7nc.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: >>>>> Vaseeharan Vinayagamoorthy write= s: > I think that after this patch is when I am seeing these errors when > building cross toolchains, for arm-none-eabi and aarch64-none-elf, > using gcc 4.8. Can you try a newer gcc? > /=E2=80=A6/src/binutils-gdb--gdb/gdbsupport/ptid.h:161:13: error: special= ization of =E2=80=98template struct std::hash=E2=80=99 in differ= ent namespace [-fpermissive] Or, alternatively, try the appended? Tom diff --git a/gdbsupport/ptid.h b/gdbsupport/ptid.h index f8644d47633..96c7d9c8bfd 100644 --- a/gdbsupport/ptid.h +++ b/gdbsupport/ptid.h @@ -157,8 +157,10 @@ class ptid_t tid_type m_tid; }; =20 +namespace std +{ template<> -struct std::hash +struct hash { size_t operator() (const ptid_t &ptid) const { @@ -169,6 +171,7 @@ struct std::hash + long_hash (ptid.tid ())); } }; +} =20 /* The null or zero ptid, often used to indicate no process. */ =20