From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 818823858D38 for ; Fri, 1 Dec 2023 06:25:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 818823858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 818823858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701411941; cv=none; b=S8TiIbO8e3Fg6YI446emI5PvywOq2UrEAssWoCuMqMNj5slWmZgDo3oRSLHjRW/qN/Snn5A78oY7lnq0QwYFs7YDUXyjWSTj4Bsw8NEx8GC8LfmF6VgHNdZ5KnvhzQdj3IRI+f5j49gVtwBTXTecnIf8/LWpg933G5fumXud+Q0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1701411941; c=relaxed/simple; bh=u13QEwY5T88aYn/aPxhD7hRLwVdL64sUZSqbCw+UPJ8=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version: Subject:To:From; b=l+Tv/Lx1RI8LclNrheaX15kv8hcZ8RV84ZmRVpBPxoCtVJERbh+H4qxExNwzC9+MqQFEOw7S4+OEm4e0vlxTnoYaFeVyWgpjO/EIibRVbEo71i8VxA8UZUBJ864y27nOBBiYmp1LMLCTB4U8Z0DNvJSlRsBZIWpMVdCC3E5EGNg= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 6B4351FD4F; Fri, 1 Dec 2023 06:25:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1701411938; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CSdieYXFm8LM7coRhxGfLFt674lgJhWE8nzs1jOj3kE=; b=PkC/24LwSROZDi0RgWbBWjRsFxu0/XvIQnpZhChPW/tdj8NgpUzcDHXLCDxWBxluAbbvxQ L3YCZ32/AF7pCdkpYATjZCRmej3aD2Iwt1lOjGxqiRJzkDEMqHqPDPuZ9t1ke65TRWOZZd lWuX1OJ7LXc+8QqIskuzPtplDejV+jg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1701411938; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CSdieYXFm8LM7coRhxGfLFt674lgJhWE8nzs1jOj3kE=; b=y9v/Hh5Nj4z5Wza2fsd/vFRQBx4LEF+Pxufc3YCat1fmS28e0TXaTRG7Ne14Soy06mF2BI icv9FL+1Ulcfu0Aw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 529811379A; Fri, 1 Dec 2023 06:25:38 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id J+xCEmJ8aWXYHgAAD6G6ig (envelope-from ); Fri, 01 Dec 2023 06:25:38 +0000 Message-ID: <81289926-2cea-4fb9-8577-7401ddeb3cd7@suse.de> Date: Fri, 1 Dec 2023 07:25:38 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] [gdb/build] Fix adding -DNDEBUG to python flags of release build Content-Language: en-US To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20231130112128.9197-1-tdevries@suse.de> <874jh3cab0.fsf@tromey.com> From: Tom de Vries In-Reply-To: <874jh3cab0.fsf@tromey.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Authentication-Results: smtp-out2.suse.de; none X-Spam-Level: X-Spamd-Result: default: False [-0.66 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; XM_UA_NO_VERSION(0.01)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; BAYES_HAM(-0.03)[56.59%]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.46)[0.153]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; RCPT_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Spam-Score: -0.66 X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 11/30/23 20:26, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> [ This was not obvious to me, but apparently evaluating an empty or undefined > Tom> variable in this context is similar to using ':' or 'true', so the line is > Tom> evaluated as: > > TIL. > > Tom> [ Unfortunately, the move might introduce issues similar to the one we're > Tom> fixing, and I'm not sure how to check for this. Shellcheck doesn't detect > Tom> this type of problem. FWIW, I did run shellcheck (using arguments -xa, in the > Tom> src/gdb directory to make sure ../bfd/development.sh is taken into account) > Tom> before and after and observed that the number of lines/words/chars in the > Tom> shellcheck output is identical. ] > > I don't think there's a good way to figure this out. It's one of the > problems with autoconf. > There are cases where variables are either empty/undefined, or "yes", say variable GCC. But this is one of the cases we know that the variable needs to be defined, so we can do something like: ... +empty_var () +{ + echo "EMPTY VAR, EXITING" + exit 1 +} ... And then rewrite all references to use ${development:-empty_var}. Then we can rewrite the GCC cases to be defined as either yes or no, and treat likewise. Sounds like a major task though, and also cumbersome to maintain without any automation that warns you if you've added an unprotected variable reference. Thanks, - Tom > If we do discover an issue, we may have to split the macro in two; or > perhaps move more code into it. > > Anyway I think this is ok. > Approved-By: Tom Tromey > > > Tom