public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Göktürk Yüksek" <gokturk@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/devmanual:master commit in: general-concepts/use-flags/
Date: Wed, 22 May 2019 19:37:26 +0000 (UTC)	[thread overview]
Message-ID: <1558553651.add4db87d50f4633dac12a21f5c0f98bc86cc5d6.gokturk@gentoo> (raw)

commit:     add4db87d50f4633dac12a21f5c0f98bc86cc5d6
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 14 09:44:18 2019 +0000
Commit:     Göktürk Yüksek <gokturk <AT> gentoo <DOT> org>
CommitDate: Wed May 22 19:34:11 2019 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=add4db87

general-concepts/use-flags: Also note about flags controlling CFLAGS

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 general-concepts/use-flags/text.xml | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/general-concepts/use-flags/text.xml b/general-concepts/use-flags/text.xml
index c20e8d0..4d56d97 100644
--- a/general-concepts/use-flags/text.xml
+++ b/general-concepts/use-flags/text.xml
@@ -70,6 +70,42 @@ of flags to those programs or modules that have external dependencies
 and/or long build times. The rest of them should be built unconditionally
 instead, or controlled by a flag such as <c>minimal</c>.
 </p>
+
+<p>
+You should not introduce USE flags that merely manipulate <c>CFLAGS</c>,
+<c>FEATURES</c> or similar variables configured directly by the user. Instead,
+packages should avoid manipulating them at all, and let users set them directly.
+Common mistakes include:
+</p>
+
+<ol>
+	<li>
+	Using <c>debug</c> USE flag to force <c>-O0 -g</c> and disable
+	stripping. The correct purpose of <c>debug</c> flag is to control additional
+	debug code paths. The use of correct flags and features to preserve
+	debugging information is user's responsibility.
+	</li>
+
+	<li>
+	Introducing <c>lto</c> flag to force <c>-flto</c>. This is something user
+	should set directly in flag varibles.
+	</li>
+
+	<li>
+	Using <c>CPU_FLAGS_*</c> to control <c>-m*</c> options. Those flags are
+	intended to control code paths explicitly requiring specific CPU extensions,
+	e.g. separate assembly. Compiler-generated assembly should respect user's
+	<c>-march</c> choice.
+	</li>
+</ol>
+
+<p>
+There might be corner cases where these rules do not apply. For example, a few
+upstreams require users to use specific <c>CFLAGS</c> and reject bug reports
+against builds using other values. In this case, it is customary to strip flags
+by default and provide <c>custom-cflags</c> flag to allow users to force their
+preferred flags.
+</p>
 </body>
 </section>
 


             reply	other threads:[~2019-05-22 19:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-22 19:37 Göktürk Yüksek [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-12-09 18:29 [gentoo-commits] proj/devmanual:master commit in: general-concepts/use-flags/ Ulrich Müller
2023-08-22  6:03 Ulrich Müller
2022-02-21 21:40 Sam James
2021-08-01  2:13 Sam James
2021-08-01  2:08 Sam James
2021-04-10  7:03 Ulrich Müller
2021-04-10  7:03 Ulrich Müller
2021-04-10  7:03 Ulrich Müller
2021-04-02  7:00 Ulrich Müller
2019-05-24  8:40 Ulrich Müller
2019-05-22 19:37 Göktürk Yüksek
2019-05-22 19:37 Göktürk Yüksek
2019-05-22 19:37 Göktürk Yüksek
2019-05-22 19:37 Göktürk Yüksek
2018-06-22 18:25 Ulrich Müller
2014-04-06 15:51 Markos Chandras
2012-04-05 14:22 Torsten Veller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1558553651.add4db87d50f4633dac12a21f5c0f98bc86cc5d6.gokturk@gentoo \
    --to=gokturk@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox