From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x534.google.com (mail-ed1-x534.google.com [IPv6:2a00:1450:4864:20::534]) by sourceware.org (Postfix) with ESMTPS id 95CD83858D39 for ; Tue, 19 Oct 2021 09:12:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 95CD83858D39 Received: by mail-ed1-x534.google.com with SMTP id i20so10123652edj.10 for ; Tue, 19 Oct 2021 02:12:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=t8fXe83rwUqe1MlxrASAnVsugQx/Kj+RmKLsCvxNRqU=; b=vJlnI0iAm6t3abbFB/bp4UjCm+CdXgOOBUVGqIlaUCogE/JygTRHhWSpSuyAWpve8f 4rOqLUzwFwTs+Im8Em39aklbpnAUPHpcFCaZm5SUNDj+g9ZtkFZv7WvuuNs7UI3DE88S olVgwVZpiDeaITv5P4cZxZdVlRoRbNBRVAN9IqKDUN6oNMgz58G6/15B4z+2krgtUF1H S+mc0V95jQvAFrJ/kWRZPkChFPVtRIdGgLrXHqg9ZBLnBikfm1ZM35d0/Op/LTobACOx CsOrNRO7UZW8QFUaEFeU8ndVKde3BuuQV9WyhYBkJZDo0hwDyw1MlZrzN9wFbiK5JNdv 9ubA== X-Gm-Message-State: AOAM531+bNyw2cDG8hNUbE5yBAXv8MVHIy1pcNRQd7aMyZBLW2PePGTS sJBvjEZBnngy9WyhH1T3rr0BZBnlcg1SctV49YA= X-Google-Smtp-Source: ABdhPJzVOxr19pn00CUkxeaD+YFVfLWbtLlL+iHtAT8ET2VzVwbILWjAsfJDP/FsVDgPeYKYVfp53fodigx4nfQsm3o= X-Received: by 2002:a05:6402:35cb:: with SMTP id z11mr55936888edc.342.1634634747481; Tue, 19 Oct 2021 02:12:27 -0700 (PDT) MIME-Version: 1.0 References: <202e07b3-e8d5-85e2-c0a5-8a40a61d7175@suse.cz> <0ea9882e-8d7c-f6d4-9262-50e2b3ae5e6c@suse.cz> <163c4fd6-5c81-0a4f-5d5a-c2a06c275fa5@suse.cz> In-Reply-To: From: Richard Biener Date: Tue, 19 Oct 2021 11:12:16 +0200 Message-ID: Subject: Re: [PATCH] options: Fix variable tracking option processing. To: =?UTF-8?Q?Martin_Li=C5=A1ka?= Cc: GCC Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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: Tue, 19 Oct 2021 09:12:34 -0000 On Fri, Oct 15, 2021 at 5:22 PM Martin Li=C5=A1ka wrote: > > All right, and there's second part that moves the code > from toplev.c to opts.c (finish_options) as I've done in the original ver= sion. > > The patch also handles PR102766 where nvptx.c target sets: > debug_nonbind_markers_p =3D 0; > > So the easiest approach is marking the flag as set in global_options_set, > I haven't found a better approach :/ Reason is that nvptx_option_override > is called before finish_options. So currently nvptx_option_override is called before we do this code blob (it's called at the beginning of process_options). Why's the solution not to move this setting to finish_options as well? (and disabling it along var-tracking when we end with no -g in process_opti= ons) IMHO the target should have the last say, so the hook should be invoked after we are finished overriding stuff and finish_options should be _only_ doing diagnostics and disabling stuff we cannot handle. Richard. > Patch can bootstrap on x86_64-linux-gnu and survives regression tests. > > Ready to be installed? > Thanks, > Martin