From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117705 invoked by alias); 12 Dec 2019 01:14:15 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 117695 invoked by uid 89); 12 Dec 2019 01:14:15 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=H*M:home, H*MI:home, hum, blogs X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Dec 2019 01:14:13 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2416756076; Wed, 11 Dec 2019 20:14:12 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 3Lj-Zx1-pY5h; Wed, 11 Dec 2019 20:14:12 -0500 (EST) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id A139656070; Wed, 11 Dec 2019 20:14:11 -0500 (EST) Received: from livre.home (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTPS id xBC1DoSD187250 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 11 Dec 2019 22:13:50 -0300 From: Alexandre Oliva To: Richard Biener Cc: gcc-patches@gcc.gnu.org, ebotcazou@adacore.com, joseph@codesourcery.com Subject: Re: introduce -fcallgraph-info option References: <84223B6B-F6F0-4B94-835E-6661E1E1EB6A@suse.de> Date: Thu, 12 Dec 2019 01:14:00 -0000 In-Reply-To: (Richard Biener's message of "Mon, 9 Dec 2019 10:41:34 +0100 (CET)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-12/txt/msg00844.txt.bz2 On Dec 9, 2019, Richard Biener wrote: > On Tue, 3 Dec 2019, Alexandre Oliva wrote: >> I'm considering rejecting command lines that specify both an explicit >> -dumpdir and -save-temps=cwd, and in the absence of an explicit >> -dumpdir, arranging for -save-temps=cwd or -save-temps=obj to override >> what would otherwise be the default -dumpdir. > Making -save-temps=cwd essentially a short-cut to -save-temps -dumpdir ./ > is fine I guess (we usually do not start to reject previously accepted > options). What if -save-temps=* and -dumpdir both set the same underlying aux output dir, with the latest one in the command line prevailing, rather than being rejected? >> gcc -c foo.c -dumpbase foobar && gcc -c bar.c -dumpbase foobar >> >> and >> >> gcc -c foo.c bar.c -dumpbase foobar >> >> The latter will name outputs after foobar-foo and foobar-bar, >> respectively, whereas the former will overwrite outputs named foobar >> when compiling bar.c. Under the proposal to modify %b according to >> -dump*, even object files would be named after an explicit -dumpbase, >> when -o is not explicitly specified. > I think rejecting option combinations that do not make much sense > or would introduce inconsistencies like this is better than trying > to invent creative things second-guessing what the user meant. Hmm, I sense conflicting recommendations here vs the previous block ;-) A single -dumpbase when compiling multiple sources used to be accepted, after all, it just overrode aux outputs so only the last one prevailed. > Hum. I didn't notice -dumpdir is just a prefix and I wouldn't object > to make it errorneous if it doesn't specify an acutal directory. But would you object to retaining the ability to use it as a prefix? > I also note that neither -dumpdir nor -dumpbase are documented > in invoke.texi *nod* > Not sure if all this means we should document the altered behavior > or if we should take it as a hint we can alter behavior at will > (in future) ;) I suppose we have more leeway in changing what's not even documented. Thanks again for the feedback! -- Alexandre Oliva, freedom fighter he/him https://FSFLA.org/blogs/lxo Free Software Evangelist Stallman was right, but he's left :( GNU Toolchain Engineer FSMatrix: It was he who freed the first of us FSF & FSFLA board member The Savior shall return (true);