From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by sourceware.org (Postfix) with ESMTPS id 9A1603858C2C for ; Thu, 9 Sep 2021 15:05:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9A1603858C2C Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 189E9bFw009005; Thu, 9 Sep 2021 15:05:43 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by mx0b-00069f02.pphosted.com with ESMTP id 3aygy68sap-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Sep 2021 15:05:43 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 189EuJve104239; Thu, 9 Sep 2021 15:05:39 GMT Received: from nam11-dm6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2174.outbound.protection.outlook.com [104.47.57.174]) by userp3020.oracle.com with ESMTP id 3axst5j4r5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 09 Sep 2021 15:05:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iQztoEjM094ThFnk74+Fv0g8+rmdoZdDtG22V0pJbAYRafUMjzerGtlywPM6IhfiePjxA9WnaFCO2tZQi6IwiBKe+Jss1ksDvMzU4MJu8+rXfU6AGWkd2oMKxYEB/c8L4qO4U6iR64wu1+rRBRSYvR/fXLkzVRY0Cugp6VjufGCwHYFmrLPVrgmjv8wGFQWHet8484T9S7vZshpOmJRHwLNG+QrqBdadOnhXFWLnFyGQNsoDYqmAGpw57c7eRmYUURf8pSHjqJZdUEKZ0TsezFawQw26sBCED0iN17zOgbOBz4iqReOfYRq4AuaM2N4aDhOkOWBLmKEYlmv+B+LDsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=6NKo9uSer/APj03BohqQz36d3tI0NuVer6OHd0PNIMU=; b=bJh5thxtBjl1jq6zYTU/EwTapRJj4pUc2EfbysHo4SALvo8Ul4vHc7oWxOD2pFJa2pWB4KNSWND8ENcsHoIsXyZup7byWtcO+BBCTzXtdGzfGTV7UxXJONm6uHXlOxVd/i4fppEY1pkO6dzjs3p8t1DDfY8r3O9iLpB+ywTh15Z2W1YjEKvz2+f9RYsF0sX6JZMbuUk9AJKTWgeXS5hKCOtn7v1KYVAsOCUv7yTyyKUzrGXuvir2qLUWC6wS/8gEe+CyfxU2VAe5wH+6M0AfJVQc69zPQkaGTkp22uLdS178onfZurEECoQaWd3N1Y5nqWUnh+9gGt5+yMyrECXp6A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none Received: from CH2PR10MB4344.namprd10.prod.outlook.com (2603:10b6:610:af::19) by CH0PR10MB5162.namprd10.prod.outlook.com (2603:10b6:610:de::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Thu, 9 Sep 2021 15:05:38 +0000 Received: from CH2PR10MB4344.namprd10.prod.outlook.com ([fe80::25f8:eaf:a3b9:fe86]) by CH2PR10MB4344.namprd10.prod.outlook.com ([fe80::25f8:eaf:a3b9:fe86%4]) with mapi id 15.20.4500.014; Thu, 9 Sep 2021 15:05:37 +0000 From: Qing Zhao To: Jeff Law CC: Nick Alcock via Gcc-patches , John Henning Subject: Re: [Patch][doc][PR101843]clarification on building gcc and binutils together Thread-Topic: [Patch][doc][PR101843]clarification on building gcc and binutils together Thread-Index: AQHXlUltXnR2pvnYZ0O8kAhyv4DbxKuAmYyAgBtUKgA= Date: Thu, 9 Sep 2021 15:05:37 +0000 Message-ID: References: <72d8eff5-5a0f-9e4d-68be-476c4bc1fc5c@gmail.com> In-Reply-To: <72d8eff5-5a0f-9e4d-68be-476c4bc1fc5c@gmail.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3608.120.23.2.7) x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 18dc1e36-73a6-447b-8025-08d973a34851 x-ms-traffictypediagnostic: CH0PR10MB5162: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: Ja0y2ZgrmzBqu/74f4/rYv0qadOMn2y+SGMQKKGuHKAjAiFPm9FGXTiX8KJUs1C57rH+0frUHiQgToQBcnfBdcb7RlnUPy2/SIDuV/4plB5LyECsTbwpPDUeU/T4H+VWdYwIDvv/PGxEKG9ygrlRNqF2OcmmsgNH6misoOiFKWKKC8ROAx0eFwfnRgHQxQjHaabdrxJdHsagbeYB52JyEQYK6DXiGUWrBznkZub3nYUH4dTOga4n2g/sY4kiFELfHceKhjFnDCZZ6qZ63TDSAqGESAcnsovUNw8/L8qVt1yalfukwO8KigxxsMHji605dg6nIzntsnXrvvWhR0GbQT5uAYZDLQ6euz3yeV07y0RkwREKXCEusq3sftmDb8Hwha2UNWtdMlm1ipi15rsuX553hhfX7dKbKWi6e8xhKG+eh0JdtyWy3XlOuLByTIRHwwz0Rj5TJm/1jztVKL4V10fACpoNrfkPP3/zbRbvVWenns7avmuSUl6dJu0tyqMaQSCTX9ZRRaXioj05ZEH4mcFMrUKvJufxcs4L2azUhZHYnEZdwQfSq4yWP107f0AyPvd+RcnFXo1S7BJF2iCGKlrr9GRUsFqMh0OK3JE0ugid/MZjtqq5ilaNs2ZMbi8duSLVMphPgQJkTZUklVjpaSpMqZ901r/C5tDwXRv5lxP5/7UybY38KiAKLc9SybHMg5JvOShEys6vjfp1IcT3x3ZAmSuoVJ89o5mfS3OhkJf5BMy1Zv4ecgp35UqTuVIi9Yy22WosLXrCxYZGHPHpXsjh19eCiSZgM8OAUrQH78Bj5/54/IMZKPvCavIV3V+rEYSbJi+70E+U2HxLKCVytLiYoWVghRHxLAurLZ25Vtw= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR10MB4344.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(136003)(366004)(346002)(396003)(39860400002)(376002)(6506007)(53546011)(8936002)(6916009)(38070700005)(38100700002)(2616005)(66446008)(6486002)(6512007)(66946007)(91956017)(4326008)(2906002)(76116006)(478600001)(66476007)(966005)(8676002)(71200400001)(5660300002)(186003)(66556008)(64756008)(107886003)(36756003)(54906003)(83380400001)(316002)(44832011)(33656002)(86362001)(122000001)(45980500001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fffQNbOsl3fSXWUyf2yM26MVBccWr6IfAW15baBw6/mE9g02WN8YZNuASjJv?= =?us-ascii?Q?TC99LwdHns6mGIjSfepavQA0lZ4Hl+v4AVJW/0M1sibrXhn8FQ5Ca6kk1gh4?= =?us-ascii?Q?d6gJBv7DUTOW5lZKq5/FTKhAoqu45Y/RZz7e2hFbffqqAdLEam6Ed5X3v7t0?= =?us-ascii?Q?6PXsT0WzzRioAleb7rLPH6Lt883xEzFXlSwaptMDxPiuYGLl6cEwsBjtpAEL?= =?us-ascii?Q?4q2+YAUGQ/fWnHyRSCyZ4rMNHEmlg3u9Z5qagD2nijBh1AnnxJvsb328L73I?= =?us-ascii?Q?fxcjX/FpSpC3cQwtc7BSmeS0i3CFPe8FL0c2nCXX8trswpB/166JHbtA5Onk?= =?us-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wr59NyopisX2wuJrl0?= =?us-ascii?Q?abkJkf+CEUDJoxjCim7B4aiJwhSIkja+yezR445Tb1rFqbVVJkE4/fVn6XWt?= =?us-ascii?Q?uXK8PQFqD6nnm/BFtHesKxAYAUu4gt1PokJRzz/EcRG22j7XtkDtIznK42o+?= =?us-ascii?Q?fy9uyL4=3D?= Content-Type: text/plain; charset="us-ascii" Content-ID: <2C4797006CC68C47AC95289A92089751@namprd10.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH2PR10MB4344.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18dc1e36-73a6-447b-8025-08d973a34851 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Sep 2021 15:05:37.8256 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: cfwg3Jx0TVsyC188kU3893O3Oh0LlzdhR6wdV/dfN0kQJ9wOCVgfWGKaHNavU5/jhO5BVJA0uzOlFC2OSQ3hqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB5162 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10101 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 bulkscore=0 mlxlogscore=999 malwarescore=0 spamscore=0 mlxscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109030001 definitions=main-2109090092 X-Proofpoint-GUID: zMgWwNXPuvpX2b8W5jgOenIB5CWGMpSz X-Proofpoint-ORIG-GUID: zMgWwNXPuvpX2b8W5jgOenIB5CWGMpSz X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Sep 2021 15:05:48 -0000 Hi, Jeff, Sorry for the late reply. The following is the reply from John Henning and the updated patch based on= your suggestions,=20 Please take a look and let us know any issue there. Thanks. Qing =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jeff Law suggested that the documentation should recommend building binutil= s separately. The same suggestion was made in the discussion of bug 101843. = =20 OK. Rev.2 of the suggested doc patch DOES make that recommendation. Rev.2 of the patch DOES NOT remove all documentation of GCC+binutils combined builds, out of respect for existing user practice (*). Rev.2 of the patch DOES remove mention of unpacking binutils=20 "in the same directory" which is clearly dangerous for subdirectories that have the same=20 name but different content (such as libiberty/, which is what led=20 to bug 101843). (*) There are many google tracks, and it has been documented >20 years https://web.archive.org/web/20001014203336/http://gcc.gnu.org:80/instal= l/download.html Therefore I (jhenning) suggest that it is useful to provide the clue on how to have the best chance that a combined build will succeed. >From b0034a941ff6a74589369a1f79cfc12295edf5d3 Mon Sep 17 00:00:00 2001 From: Qing Zhao Date: Thu, 9 Sep 2021 15:00:26 +0000 Subject: [PATCH] doc/install.texi: add a generic advice on building gcc and binutils together. --- gcc/doc/install.texi | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index 8e974d2952ef..a5ac462933b9 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -562,8 +562,14 @@ language front end and the language runtime (where app= ropriate). If you also intend to build binutils (either to upgrade an existing installation or for use in place of the corresponding tools of your -OS), unpack the binutils distribution either in the same directory or -a separate one. In the latter case, add symbolic links to any +OS), begin by identifying a version of binutils that was created at +about the same time as your version of GCC. It is recommended to build +and install binutils first, before building GCC. You can set the prefix +directory to the same as will be used for the GCC installation. + +Alternatively, it is often possible to build binutils at the same time +that you build GCC. If you wish to try this method, unpack the binutils +distribution in a separate directory, and add symbolic links to any components of the binutils you intend to build alongside the compiler (@file{bfd}, @file{binutils}, @file{gas}, @file{gprof}, @file{ld}, @file{opcodes}, @dots{}) to the directory containing the GCC sources. --=20 2.27.0 > On Aug 23, 2021, at 12:45 AM, Jeff Law via Gcc-patches wrote: >=20 >=20 >=20 > On 8/19/2021 4:27 PM, Qing Zhao via Gcc-patches wrote: >> Hi, >>=20 >> This patch is on behalf of John Henning, who opened PR 101843: >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D101843 >>=20 >> He proposed the following doc change, please take a look and let me know= whether this is Okay for commit? > I think we need to get away from suggesting single tree builds. Instead w= hat we should recommend is to identify the right version of binutils, build= and install it into the same prefix as GCC will be installed, then build a= nd install GCC. >=20 > jeff >=20