From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id lzJNC59y9F/3PwAAWB0awg (envelope-from ) for ; Tue, 05 Jan 2021 09:07:27 -0500 Received: by simark.ca (Postfix, from userid 112) id 209031F0AA; Tue, 5 Jan 2021 09:07:27 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3E2C81E965 for ; Tue, 5 Jan 2021 09:07:26 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6FEBF38930E1; Tue, 5 Jan 2021 14:07:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6FEBF38930E1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1609855644; bh=MA248YAZZoJz7Nw+oI1mBLSzpgS6aGt3GbgZc+Sj11Q=; h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Qnrc4ugoQdcfk34IkSjHrkr25GE8m6ulpi261LPQj7bTvZ2FPgrNASRZ+6zrDdW/r mpA7kWCe6FVZ1SN0MpW5YmBBGaqaoSCg4twR2Ft3rnp77bmm0nL1YXxhdOYsurP4na Qdi5wI1I3erTVZgvGVJS2YmOsjlsjdGmcxZpyOec= Received: from mail-ot1-x335.google.com (mail-ot1-x335.google.com [IPv6:2607:f8b0:4864:20::335]) by sourceware.org (Postfix) with ESMTPS id B2074388E805; Tue, 5 Jan 2021 14:07:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org B2074388E805 Received: by mail-ot1-x335.google.com with SMTP id d8so29337533otq.6; Tue, 05 Jan 2021 06:07:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MA248YAZZoJz7Nw+oI1mBLSzpgS6aGt3GbgZc+Sj11Q=; b=sNx4Sm66Xu1+0J0Dz7zCteQ+h9nyrQWT6Ok0yyF6EbgYJqbet9ZRcduVhRqb67Ckl1 YWh7YozS0o54xoYpifoY9OreS+QaNVSw4zSrm6GEhy1/O3pz0pp5XnYuQj7DpzHOOw+l 3xGJRQSYJf52XnNil7euNa6eHnfDDfa1IYFabAgV2aCCGcRiOjnJfTzrBnH8ETG5Y09l sc0egun5zL4EplqTGu4j20UYx77KDWEweXyIotArnGlTOWOWOgDksR5o/BjEhKTwFS+O 24flJS/xAfDox55Cxpfpeq7xv9etG1cPPF1id4hAe4oZqa83Kla1gktB6+mwpx44m6sd qHFw== X-Gm-Message-State: AOAM531zaDWNeNsBXrOr9nUQ4xjQlcB1FJ2uJE/DYnJoyc6KkAsMrDj/ WsvIkSXGsFuP8TUwICJKFGEKL4PJIMdq0G+tddTKaBTFSQM= X-Google-Smtp-Source: ABdhPJybnhJnChiK0xskY7Wh9TNVV/e/OJBfC6q/GzAmzxkjf8DtGwM0mrn4nnDaKvqID6pj8fLK4NEqwSwEzQcqgF0= X-Received: by 2002:a05:6830:10d2:: with SMTP id z18mr55783362oto.90.1609855640117; Tue, 05 Jan 2021 06:07:20 -0800 (PST) MIME-Version: 1.0 References: <20201219181036.178248-1-hjl.tools@gmail.com> <20201219181036.178248-6-hjl.tools@gmail.com> In-Reply-To: Date: Tue, 5 Jan 2021 06:06:44 -0800 Message-ID: Subject: Re: V3 [PATCH 5/5] gnulib: Support variables from the top level Makefile To: Christian Biesinger Content-Type: text/plain; charset="UTF-8" X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: "H.J. Lu via Gdb-patches" Reply-To: "H.J. Lu" Cc: Matthias Klose , GDB , GCC Patches , Binutils , Joseph Myers Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Tue, Jan 5, 2021 at 5:27 AM Christian Biesinger wrote: > > On Fri, Jan 1, 2021 at 1:07 AM H.J. Lu via Gdb-patches > wrote: > > > > On Thu, Dec 31, 2020 at 3:50 PM Joseph Myers wrote: > > > > > > On Sat, 19 Dec 2020, H.J. Lu via Gcc-patches wrote: > > > > > > > Work around what appears to be a GNU make bug handling MAKEFLAGS > > > > values defined in terms of make variables, as is the case for CC and > > > > friends when we are called from the top level Makefile. > > > > > > This description, and the comment in Makefile.am repeating it, is rather > > > unhelpful as it provides no way for a reader to know what the supposed bug > > > is. Reviewers need to be able to work out whether the proposed workaround > > > is correct or the right approach for working around the bug. Maintainers > > > in future need to be able to tell what the bug is. So the comment needs > > > to explain what the bug is and give a reference to a report for the bug in > > > the GNU make bug tracker, so that subsequent maintainers can look at that > > > bug to tell if the workaround is still needed at all. > > > > > > > I just copied the same workaround from other directories in GCC. > > But could you explain under which circumstances the bug happens? > To rebuild a subdirectory with different CFLAGS/CXXFLAGS without regenerating new Makefiles, like bootstrapping GCC and doing PGO build in binutils/GDB, we pass new CFLAGS/CXXFLAGS from toplevel Makefile to the subdirectory. Without this workaround, the old CFLAGS/CXXFLAGS are used in the subdirectory. The same workaround is used in subdirectories for bootstrapping GCC. My patch extends it to GDB for PGO build. -- H.J.