From nobody Fri Apr 12 12:03:28 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VGFb31WBjz5HGyZ; Fri, 12 Apr 2024 12:03:43 +0000 (UTC) (envelope-from makc@freebsd.org) Received: from mail.issp.ac.ru (mail.issp.ac.ru [77.236.34.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "relay.issp.ac.ru", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VGFb25Sbxz4RMB; Fri, 12 Apr 2024 12:03:42 +0000 (UTC) (envelope-from makc@freebsd.org) Authentication-Results: mx1.freebsd.org; none Received: from mail-lf1-f54.google.com [209.85.167.54:43407] (HELO/EHLO mail-lf1-f54.google.com, authenticated with PLAIN) by mail.issp.ac.ru with ESMTPSA/inet id 43CC3eP7030275 (using TLSv1.2, with cipher ECDHE-RSA-AES128-GCM-SHA256 (128 bits), verified FAIL) Fri, 12 Apr 2024 15:03:40 +0300 (MSK) Received: by mail-lf1-f54.google.com with SMTP id 2adb3069b0e04-516a01c8490so1363095e87.1; Fri, 12 Apr 2024 05:03:40 -0700 (PDT) X-Forwarded-Encrypted: i=1; AJvYcCX2c/uNpntjeJmx5iaSKud0kgq90LNTVyOUqDSy2EQLXV5zHck4cHSp2fCBHVopjbFwkAD80RNLe6fxgi/61N6G1HJ1sZqlDeyd7NQhaU+nu9mfHWfF5RjnOjheKia1hdwX5SpbBwfMuAQu5AIh8oy/xh9PpAnoTVFtR7qMvEiCHv/wqYWUNThP1AJt2LR2Q/1CW3M= X-Gm-Message-State: AOJu0YyTLn96hDS0reecc88SVTPvgQZkIQjxv2DEd7s5qymUa+I3fEBQ fhzxgio6dcK8Bs/vMBSrPdiGRxRTzwZyc8N9HSGWcw2JBaSKkT18pU9HuTH/i5eOY5nKgxCS0Wq apjL4n1KVq2NJ/K2u5dI3OUr+uxU= X-Google-Smtp-Source: AGHT+IGg6yp3W/TVtab9Js/2NR4/q374+BzC7ZwuzWT8oSGcq2ETK1QSW5aMoHRFLH5ZCGtyS8ZhNtEGS50M3jCWSKs= X-Received: by 2002:ac2:5451:0:b0:513:d8ca:4495 with SMTP id d17-20020ac25451000000b00513d8ca4495mr1458648lfn.22.1712923420509; Fri, 12 Apr 2024 05:03:40 -0700 (PDT) List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 References: <202404120607.43C674EB042318@gitrepo.freebsd.org> In-Reply-To: From: Max Brazhnikov Date: Fri, 12 Apr 2024 15:03:28 +0300 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 0660187ad07f - main - cleanup: remove occurrences of WITH_DEBUG To: Baptiste Daroussin Cc: Mathieu Arnold , ports-committers@freebsd.org, dev-commits-ports-all@freebsd.org, dev-commits-ports-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:9113, ipnet:77.236.32.0/20, country:RU] X-Rspamd-Queue-Id: 4VGFb25Sbxz4RMB On Fri, 12 Apr 2024 at 13:31, Baptiste Daroussin wrote: > > On Fri 12 Apr 12:41, Max Brazhnikov wrote: > > I don't quite understand something about ports options and features. > > > > Can we have the same knob as an option and as a feature? > > > > For example, graphics/glaxnimate has DEBUG in the OPTIONS_DEFINE and > > the following lines in the Makefile: > > > > .if !${PORT_OPTIONS:MDEBUG} > > CXXFLAGS:= ${CXXFLAGS:C/-O([2-9]|[sz]|fast)/-O1/} > > -fstack-protector-strong -fno-strict-aliasing > > .endif > > > > Now to build this port in the debug mode I have to set WITH_DEBUG and > > enable DEBUG option at the same time. > > > > We should either disallow having DEBUG in the options and check only > > for WITH_DEBUG everywhere, > > or WITH_DEBUG feature should set DEBUG option automatically. > > > > Max > all options about DEBUG should be removed and only the feature being used. > > The port should test if WITH_DEBUG is defined (after .pre.mk or .options.mk) > inclusion to add port specific things if needed. I assume the same applies to all other features. Then we should drop TEST option in favour of WITH_TESTING, LTO, etc. Also update to the Porters handbook is needed. It mentions nothing about Features, furthermore test and debug are used in some examples for options helpers making the impression that TEST and DEBUG could be legit options. Max