From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 50QzM4lwkGC1TQAAWB0awg (envelope-from ) for ; Mon, 03 May 2021 17:52:09 -0400 Received: by simark.ca (Postfix, from userid 112) id C3E941F11C; Mon, 3 May 2021 17:52:09 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.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 579081E813 for ; Mon, 3 May 2021 17:52:02 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C22FC3957439; Mon, 3 May 2021 21:52:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C22FC3957439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1620078721; bh=QJjK1kO/1zzYU9FFC1QkerycBQ+n7iuowQX3PqOp+FQ=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=KC+81mhWkWRKKL0EJs+0DgWAQaPNQq/VMqexbUft/n/mK7EM4ouiYkCjrj0FmjpBQ ftWvxEtVB35mVkddjEdNeYb1wmwFA+MGENLIb8Qz4cl2GbWTd5jtuYP+ecOyfyLFZf kfy4nT9Mozb+ZP2ghGHufgtUbUENK0p5Yea/WXOc= Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by sourceware.org (Postfix) with ESMTPS id 51130388A411; Mon, 3 May 2021 21:51:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 51130388A411 Received: by mail-pg1-x535.google.com with SMTP id s22so4784247pgk.6; Mon, 03 May 2021 14:51:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=QJjK1kO/1zzYU9FFC1QkerycBQ+n7iuowQX3PqOp+FQ=; b=CeFDe8OKLwNtKgKVGpg6tHmHH80yf2RwH01sw8XJbma/z1FudOI5/22/vLZvDWe8wS I0B2oEj4vuYgvqzDbBMHnbv0DiHN2rVSzZaCEQS9slelFte1TESXfidP2sSVJBZrTQAQ C1/LOw/sUv7u9TRKI2bGlVUwcrkHzAByaeUAF0HMEPzICFTeiuILtT5z38xntrowPOoL YeW/X9p2TWY5B5TOPE1JZ9MnIT3tN8AGLwKH7dVXTGuZiPQrcp+Z39LNnTQ910ex7Lq7 LLskkPYtJO+vwIhQgXgsF60bWz9OnEyftfmSLksnWFpS/zz9wRn/DbTkbiJT+WK6pM6u XzTg== X-Gm-Message-State: AOAM531Ak2ij769wyxh92Dvu07PmXhGFmnbJozV4ntW1aX+bwdxJHRos 3DnCLRMwOWwvt+C3QUX3VeE= X-Google-Smtp-Source: ABdhPJw7bvnvCorUNX3XoyOpk5tyRVFrXoU5emejionMfUp30VAlqF/fAQsvKLy3S1TiJz1tODt4jQ== X-Received: by 2002:a63:570e:: with SMTP id l14mr20156160pgb.159.1620078714491; Mon, 03 May 2021 14:51:54 -0700 (PDT) Received: from bubble.grove.modra.org ([2406:3400:51d:8cc0:d0e9:6aa1:b92b:c83e]) by smtp.gmail.com with ESMTPSA id x90sm570596pjj.55.2021.05.03.14.51.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 May 2021 14:51:53 -0700 (PDT) Received: by bubble.grove.modra.org (Postfix, from userid 1000) id 07C0441968; Tue, 4 May 2021 07:21:49 +0930 (ACST) Date: Tue, 4 May 2021 07:21:49 +0930 To: Simon Marchi Subject: Re: RFC: Changing AC_PROG_CC to AC_PROG_CC_C99 in top level configure Message-ID: <20210503215149.GI22624@bubble.grove.modra.org> References: <8c1b0ed9-e6f3-9c22-45c5-c2680a2a4830@polymtl.ca> <15701c5f-5653-f0e4-990a-43094d18a702@gmail.com> <20210503062825.GG22624@bubble.grove.modra.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) 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: Alan Modra via Gdb-patches Reply-To: Alan Modra Cc: Jeff Law , gcc-patches@gcc.gnu.org, Nick Clifton , gdb-patches@sourceware.org, Binutils Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On Mon, May 03, 2021 at 10:47:15AM -0400, Simon Marchi wrote: > > Yes, I prefer the configure fix too. If we state we require C99 in > > binutils then we ought to be able to use C99.. > > > > Nick, does the configure.ac change also need to go in all subdirs, to > > support people running make in say ld/ rather than running make in the > > top build dir? > > For GDB, it's not supported to run gdb/configure directly, you need to > use the top-level configure. Is it supported from some of the other > projects in the repo? > > I just tried with ld, it doesn't work since it depends on bfd also being > built. I tried with just bfd, it doesn't work (with the default > configure options at least) because it requires zlib being built. I wasn't talking about running configure, I was talking about running make. For example, you configure and make binutils as usual, then after making a change to ld/ files, run make in the ld build dir. I don't tend to do that myself but I do run "make check" sometimes in a subdir expecting to get the same results in that subdir as if "make check" was run from the top level. But I should have just tried it myself rather than asking. CC, CPP and others are inherited from the top level and appear with -std=gnu99 in the subdir Makefiles. So it seems all the AC_PROG_CC in subdir configure.ac can stay as they are. > > So if all projects need to go through the top-level configure script > anyway, and C99 is a baseline for all projects, then having the check > only in the top-level makes sense to me. Projects that have more > specific requirements can have their own checks. For example, sim/ > requires C11 now. Unless the C99 check at top-level somehow does not > play well with the C11 check in sim/? Like if that would cause CC to be > set to "gcc -std=gnu99 -std=gnu11" or something like that. > > Simon -- Alan Modra Australia Development Lab, IBM