From patchwork Fri Oct 7 04:10:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Goth X-Patchwork-Id: 1803 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp111514wrs; Thu, 6 Oct 2022 21:10:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5jofIsZAQ3hex4MRoWZh+q+FYQilM2JTPLERWGlMh65BbDQe43MT6WcRt/+Z+bk4gj0Hfz X-Received: by 2002:a05:6402:292f:b0:458:e447:5c with SMTP id ee47-20020a056402292f00b00458e447005cmr2653810edb.286.1665115822961; Thu, 06 Oct 2022 21:10:22 -0700 (PDT) Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s21-20020a170906501500b0073d5a794b43si988765ejj.985.2022.10.06.21.10.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Oct 2022 21:10:22 -0700 (PDT) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=D7oGYL8B; arc=fail (signature failed); spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id E6F3A3948A69 for ; Fri, 7 Oct 2022 04:10:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6F3A3948A69 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665115819; bh=3304rEoNX25gjnjlwLpHnCwgMxbjVYwdznHXgCsjk60=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=D7oGYL8BdZYJroLByvyRSwexqNlzkPIHDgKZEvUP/yBXjeK0BBjMco+RGluo3lXb2 F8vJ+/DFsUdakXUjHgFqTLL2ogwgeOFRIwf83eUKtOyEIX85s96vTWCj+etS/wpzfa JcUiZ4wzoGvFihkO2BF32OdGRKdGHxA+ABnjJ2AA= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org Received: from USG02-BN3-obe.outbound.protection.office365.us (mail-bn3usg02on0135.outbound.protection.office365.us [23.103.208.135]) by sourceware.org (Postfix) with ESMTPS id 4C872382F99C for ; Fri, 7 Oct 2022 04:10:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4C872382F99C ARC-Seal: i=1; a=rsa-sha256; s=arcselector5401; d=microsoft.com; cv=none; b=rHtvQ1Oi3r7PR/RitV7TrMZBnftNHtO5Xr6R1YHdtD619haB4GkrDb8wSS6fl2TD5axapGmhfeJ2yZmeFh52fGl5UEAmVg8o0feHNNAG9pY/Rfg6QH9Yg/ydMbPR/h3hZjNuD84H//IJbX1/OHLJ4KBC8KQLuBpgsG/5i0UTcIX8o5AXQ9QBPvtbZkoGqt+iW8T8vhwAkgb5nFttNBZVwetAUKcVNWyJu7Q0o2cTLIQkbnZ92ARhc5sceKgPG0AM8KWNpyjbNRIRhG6sqZKXtZxc8x/19RAiyqtr6O01BVAj/13eblMo4uaIU7u6SttUb+AZ6Hb5xFecFCBZWVyApA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector5401; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3304rEoNX25gjnjlwLpHnCwgMxbjVYwdznHXgCsjk60=; b=AQSYjDXpzwwGy5ed1Q0B3FAcM0nJ1CFM8wJ62kTv3cM8k9+ouLO4lL2K/ddrXbQKEDgLl2cwuvAtchvdUpT6Ho/N0M9TfWlV1H/ryC9gEMezbICYvXgvteN7YHZcSQ18Fj3yf/cWjWAlNoTb3w0X7FIw9aOJ4YI4sWC5pym0n4ZUchzgcVLOONcCTYOSuaCSbQz/M3XFYcwj8mnoITomW4AAAqdJhoPA4p8uZ5LJhc6JIYT0NEX6IM/s9CWTzt/bA5akQKSHRGWUVMEe7E6EPkG12W0yZfxqQQtBlmwVdNS8c2Fjba1HwqhvExCNtIjdfwz1zJ7FwEN6ij6KvwxH1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=caemilusa.com; dmarc=pass action=none header.from=caemilusa.com; dkim=pass header.d=caemilusa.com; arc=none Received: from PH1P110MB1650.NAMP110.PROD.OUTLOOK.COM (2001:489a:200:188::6) by PH1P110MB1489.NAMP110.PROD.OUTLOOK.COM (2001:489a:200:18a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.20; Fri, 7 Oct 2022 04:10:07 +0000 Received: from PH1P110MB1650.NAMP110.PROD.OUTLOOK.COM ([fe80::c42a:6956:374b:8495]) by PH1P110MB1650.NAMP110.PROD.OUTLOOK.COM ([fe80::c42a:6956:374b:8495%6]) with mapi id 15.20.5676.036; Fri, 7 Oct 2022 04:10:07 +0000 To: "binutils@sourceware.org" Subject: @CPP_FOR_BUILD@ problem since binutils-2.38 Thread-Topic: @CPP_FOR_BUILD@ problem since binutils-2.38 Thread-Index: AQHY2gJDm9zPQ8NVAEC9FIy2V5AVTg== Date: Fri, 7 Oct 2022 04:10:07 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: suggested_attachment_session_id: a2a19886-5819-34ad-0e66-05c8c5d35424 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PH1P110MB1650:EE_|PH1P110MB1489:EE_ x-ms-office365-filtering-correlation-id: 14c5ece4-29bb-48b8-6a25-08daa819d1bd x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: q4E/43fdwEtIsP8RBhg9hHqxscK5FDI0E9O61Q126NQisdfRrfWUhtaq+4hf7XMjBJhnXAzJOGKMwvO6HW/gESzFwvpW9a/nOJbXkJmTm4ZJYX5b3goBlluFDwLf4zi7z9oGc/QAUUcceKkGaqhHbO1qWvHlujCW59fWw7UQpOEDFoufoTf6sBjwvdQmqylUi+++2XGBYwV9pUEq3pdyf6/T/yRQHcL5V0+47+g2866JURBreOJnmDPcQ1f9XRenHqwCrvrJ0F0D3gJjgAHgjL5FQS9ewrghMGowGeBGuFCu5As9ytDt0TX9hyhDJYAzKoll6tC4VyMQBF9Kp0BryplUdlLmx/LkLW3eg1XmjA716wQzvcFdi1isQO0pLGM+cW2vYMCifjCt0gv1XS5chN+FT62EPM9fmteukrp6np/3x64logo7I9P28hlDxlErEWxQs54yDcTixVFlkdf7u7nBXrwVs3P8wxqxTNe67swhzA5jThkg0lRM+6MpjYuLlqm252q/wiowqS8YMGqDeSE/4i/bWPrzOiBnzWcaXge8/c0DKPsppGhBrPAQZP4npsKL9O3aJmzY7HAeJYdgl8nLsVSiQqmL2t0pHmNLluyZ7KkXLeYfQINr74ml+Z5a3so6R84RJZkNoAt2JDJsxT+JupVHLDphXt5rjb/++PIEGv1+41xe8Vzzoz4VQnvKKHmax4/3Klx9/VVjwJXxRGP8R+QmDrwZJ/KN0Qwa9ZLzcTPKz0pBLUPVxTBCnlb9QqOOO28RQrpaeU1Ry5ofRA== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH1P110MB1650.NAMP110.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230022)(4636009)(366004)(451199015)(83380400001)(71200400001)(6506007)(55016003)(7696005)(52536014)(122000001)(86362001)(2906002)(498600001)(8936002)(5660300002)(76116006)(8676002)(66946007)(66446008)(66556008)(66476007)(33656002)(966005)(64756008)(186003)(6916009)(38070700005)(26005)(9686003)(38100700002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?uQwmPnFnfmoDpiz3dvgiM5e?= =?iso-8859-1?q?qXavXHO6Bx6Y2hdwgUFaA6vOuP9iJSbEVyHA7pnVDBKVejZQZEtPN7fJUjkW?= =?iso-8859-1?q?giPZ2fRoBm2Jh4Dnb2uQbE7r/2eXbxIXToHcBMqcwAJs4ey+EOOaVY7EzwyU?= =?iso-8859-1?q?UFnX9n8juMid887JmhwcfLiFn9hoFk6ZasPoxL15mK3Zj5berQXp4chrAGlj?= =?iso-8859-1?q?uJyZ22BdptgfKP9PRzwCCaoX/qgmarpdUBsYN+rzRoTjun3u7YJWjE6WWgvl?= =?iso-8859-1?q?ECWQXhCUxpG+dpqTj6MFIsNwshFcQxmIXxBPQLmx2WdF3z9qXPPrHKRgJyHY?= =?iso-8859-1?q?ARyzi50WH2SwFkc74H+p40p5aoiEniV+bOhjYisJGtcyi3FaFh2Dh+472IIg?= =?iso-8859-1?q?4sBChdSjgFSI85A8g5/eowuPX58NsC3f7tg20SFbjQZ8WkzJUjDYi6GD0fCi?= =?iso-8859-1?q?ppxSZw1v2baRFScleJXfkVb9czgVtRZ4aL7QEqBF1P0MpI7CNKeWHsDiAOEB?= =?iso-8859-1?q?bAOSx2Tm+ni+4ol9NrdP+kZC+O4R5eDlxQ00xJpRst0w/XHmAD98pY/ZEy0T?= =?iso-8859-1?q?HSnRzTRIFIzJrYLRl61L3979X+Kgrm0Hmz6dcEiTcKTefBqAR6ynnFliPxlS?= =?iso-8859-1?q?nntDiJF2RC6t2TaQAwTStyyMDQxJvbhU9c4XSk1yQqubrjR8BB/M+yuWRXEq?= =?iso-8859-1?q?3v7SRWTGVsM6OYCDOOTkK4/SEcFWnecz+YlLHuyzHYSs2YmoXeAjt0kYKES6?= =?iso-8859-1?q?Eh6I+1Lg4bOZUPLb4er9M7wFg40yueQM6UEOkoAzHFnFDyDsVzqYKw2mlzsx?= =?iso-8859-1?q?qmJbRZgqGyKwajvhLTbV/h5xH8oR2Xm1P7CP9ajZ8TjgH7mXBpe2IOu/lVs7?= =?iso-8859-1?q?KYQNyVu3s/CEebx91nZ4pd5CuByz4gN6ynI2MmEobkaAH0F2lN49NTXhm0q2?= =?iso-8859-1?q?nlJ/B3LTot0G6D2s1QiDvr3dzYBBWbGvTeQhSD7am7cJpyX0XFb6viRSs9FI?= =?iso-8859-1?q?5Cy4RaaCJqt9fsnRix1H4bIqLDrR4wN4bIlLP2n10drjHZ1VV5FGU5gfBIay?= =?iso-8859-1?q?oToJ1yv+lm0SYBdZOD5I/DY/3K15jP/TXr9cLB9o6u63767BWAWYn7EEsH3Z?= =?iso-8859-1?q?PQ1WclhtTw9ja59LA7umq+zuCTIyPmiqM2VXrhgc3dgbTiHVAXY/UXWWlKDO?= =?iso-8859-1?q?C5yV37HUuqycl44KQemy4fkEZr0eI1+Mqe2rNrIiZfSZ+AeFH6oKwzopEIvG?= =?iso-8859-1?q?JO8qQje3EQwxOOdMZOLUs2hGUtwpwY9jT1hy8GeIFxLkRIux3BiEBhvy2mD0?= =?iso-8859-1?q?hDNyVWmpoDAvZ+P0RVujyx+vVGkSIrVMl2Nz/EAfn9uNlYEvECN59OIGJnum?= =?iso-8859-1?q?mBcQSt3WWIZd4zpq6Srm80AtfE8mtw6HrWwZhyvLPaT9gQLnYMGTXN8FUZ0g?= =?iso-8859-1?q?tkmUlgN7RRu2enC2S0SDCqIkT4+Eb3rLrNoIu3rUvki9+x9yBx13c92xtow1?= =?iso-8859-1?q?4YWyi7JDRHqncr37EqCqdWEl828AgSo/2F0+22oE6ZafGIEN7Sxo=3D?= MIME-Version: 1.0 X-OriginatorOrg: caemilusa.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH1P110MB1650.NAMP110.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 14c5ece4-29bb-48b8-6a25-08daa819d1bd X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2022 04:10:07.2690 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b1f59ca3-5c75-45b4-91a0-1c96b6d41895 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH1P110MB1489 X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Goth via Binutils From: Andrew Goth Reply-To: Andrew Goth Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746000488849100831?= X-GMAIL-MSGID: =?utf-8?q?1746000488849100831?= Hi, I'm having trouble with @CPP_FOR_BUILD@, @CPPFLAGS_FOR_BUILD@, etc. in binutils's Makefile.in not being replaced by the configure script. This problem was introduced with version 2.38 and persists into 2.39. Here is an excerpt from the diff from 2.37 to 2.38: Every single one of these additions to Makefile.in yields a corresponding Makefile line that passes through unsubstituted. In configure, CPP_FOR_BUILD, etc. aren't in $ac_subst_vars. Similarly, they're not listed with AC_SUBST() in configure.ac, which I find most interesting. This breaks my script for building binutils, gcc, etc. as a cross compiler. The problem makes itself known during configure-isl. I embed isl-0.25 into binutils's isl subdirectory, and it chokes due to the CPP_FOR_BUILD environment variable coming in as literally @CPP_FOR_BUILD@. My successful workaround has been to stick with binutils-2.37, but I can't stay behind forever. configure:5762: checking whether the C compiler works configure:5784: gcc -g -O2 @CPPFLAGS_FOR_BUILD@ conftest.c >&5 /usr/bin/ld: cannot find @CPPFLAGS_FOR_BUILD@: No such file or directory collect2: error: ld returned 1 exit status I'm building using a fresh Slackware64 15.0 install, and I'm not applying any patches to binutils or isl. To double-check whether it's me or there really is something funny going on, as well as to give you a reproducible test case I had no hand in writing (ruling out operator error on my part), I ran Slackware's own build script for binutils, with an "exit" immediately following the configure script. This leaves me with @CPP_FOR_BUILD@ literally appearing in /tmp/binutils-2.39/Makefile, consistent with my own experience. If you want to follow along, here is the process: (1) get https://mirrors.slackware.com/slackware/slackware-iso/slackware64-15.0-iso/slackware64-15.0-install-dvd.iso (2) install onto a VM (3) boot and log in (root is fine) (4) wget -np -r -R '*.mirrorlist' -R 'index.html*' https://mirrors.slackware.com/slackware/slackware-current/source/d/binutils/ (5) edit binutils.SlackBuild to add "exit" after the configure command (6) run binutils.SlackBuild (7) find the results in /tmp/binutils-2.39 If it weren't for the exit, this would result in a good binutils build, since @CPP_FOR_BUILD@, etc. don't affect this configuration. But try building binutils with an in-tree isl and you'll have trouble due to isl's configure script looking at $CPP_FOR_BUILD. I'm considering experimenting with adding more AC_SUBST() lines to configure.ac, downgrading to autoconf 2.69, and regenerating configure. Alas, the hour grows late and I have other projects I must complete tonight, so I decided to write up this email and move on. diff -U0 -r binutils-2.37/Makefile.in binutils-2.38/Makefile.in --- binutils-2.37/Makefile.in 2021-07-18 11:47:23.000000000 -0500 +++ binutils-2.38/Makefile.in 2022-02-09 06:04:43.000000000 -0600 @@ -342,0 +367,2 @@ +CPP_FOR_BUILD = @CPP_FOR_BUILD@ +CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@ @@ -345,0 +372 @@ +DSYMUTIL_FOR_BUILD = @DSYMUTIL_FOR_BUILD@ @@ -347,0 +375 @@ +GDC_FOR_BUILD = @GDC_FOR_BUILD@ @@ -394,0 +423 @@ +DSYMUTIL = @DSYMUTIL@ @@ -398,0 +428 @@ +OTOOL = @OTOOL@ @@ -404,0 +435 @@ +GDC = @GDC@