From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OUSP0-0000P8-3W for garchives@archives.gentoo.org; Thu, 01 Jul 2010 22:38:38 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 22E23E0B11; Thu, 1 Jul 2010 22:38:36 +0000 (UTC) Received: from mail-qw0-f53.google.com (mail-qw0-f53.google.com [209.85.216.53]) by pigeon.gentoo.org (Postfix) with ESMTP id 281B7E0AE6 for ; Thu, 1 Jul 2010 22:38:27 +0000 (UTC) Received: by qwj8 with SMTP id 8so934718qwj.40 for ; Thu, 01 Jul 2010 15:38:26 -0700 (PDT) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Received: by 10.224.45.70 with SMTP id d6mr132463qaf.165.1278023906419; Thu, 01 Jul 2010 15:38:26 -0700 (PDT) Sender: antarus@scriptkitty.com Received: by 10.224.61.11 with HTTP; Thu, 1 Jul 2010 15:38:26 -0700 (PDT) In-Reply-To: References: Date: Thu, 1 Jul 2010 15:38:26 -0700 X-Google-Sender-Auth: JM3zJ64N6BB0d41OIATX1UzeEjo Message-ID: Subject: Re: [gentoo-dev] Re: [gentoo-dev-announce] debug USE flag misuse From: Alec Warner To: gentoo-dev@lists.gentoo.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 5c12cba3-28a4-4558-8d7f-e2b72e319a43 X-Archives-Hash: 8e7a7eaae72cd35e837fb598d086e6ac On Thu, Jul 1, 2010 at 3:14 PM, Vaeth w= rote: > Nikos Chantziaras wrote: >> >> If you use portage than you can control per-package CFLAGS using >> bashrc and /etc/portage/env or similar functionality. > > This is correct, but the problem is that an ebuild author or > upstream cannot set a "default" here: =C2=A0IMHO, it shouldn't be > necessary for the user to use such things only in order to > compile a package with the CFLAGS which upstream recommends. > Normally, users will not read such a recommendation (and in fact, > they shouldn't have to, since reading INSTALL or similar things > should be the task of the ebuild author). I am confused. If you want the users to use a default set of CFLAGS you should set this in your build system (autotools, cmake, whatever). http://www.mail-archive.com/autoconf@gnu.org/msg14303.html I believe the above link seems to describe what you are looking to do using autotools. Obviously if a user specifies a flag that over-rides your own flags; the user's flags will take precedence. However this is intentional behavior. I could totally be misunderstanding autotools as well; I haven't written any in about four years. -A > > Speaking from the author's perspective: There should be a way > to write code appropriate for a specific compiler flag and to > assume that most users will then actually compile the package > with the corresponding flag. > If a user explicitly does not want to do this, this is fine, > but the ebuild should have a way to make sure that this only > happens if it is really the intention of the user. > Normally, USE flags are the way to pass options to the > user, aren't they? > > Best Regards > Martin V=C3=A4th >