From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8758 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Having hard time adding to CFLAGS Date: Sat, 24 Oct 2015 15:37:53 -0400 Message-ID: <20151024193753.GS8645@brightrain.aerifal.cx> References: <20151022232330.GG10551@port70.net> <20151023030236.GB8645@brightrain.aerifal.cx> <20151023040909.GD8645@brightrain.aerifal.cx> <20151023051604.GF8645@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1445715504 18165 80.91.229.3 (24 Oct 2015 19:38:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 24 Oct 2015 19:38:24 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8771-gllmg-musl=m.gmane.org@lists.openwall.com Sat Oct 24 21:38:19 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Zq4dp-0003tb-Oq for gllmg-musl@m.gmane.org; Sat, 24 Oct 2015 21:38:13 +0200 Original-Received: (qmail 10177 invoked by uid 550); 24 Oct 2015 19:38:07 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 10152 invoked from network); 24 Oct 2015 19:38:05 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8758 Archived-At: On Fri, Oct 23, 2015 at 08:47:18AM +0200, Denys Vlasenko wrote: > On Fri, Oct 23, 2015 at 7:16 AM, Rich Felker wrote: > >> Currently, it is confusing. See for yourself: > >> > >> > >> Usage: $0 [OPTION]... [VAR=VALUE]... [TARGET] > >> > >> To assign environment variables (e.g., CC, CFLAGS...), specify them as > >> VAR=VALUE. See below for descriptions of some of the useful variables. > >> .... > >> ("ok, I got it. CFLAGS should go to configure's command line!") > >> .... > >> Some influential environment variables: > >> CC C compiler command [detected] > >> CFLAGS C compiler flags [-Os -pipe ...] > >> CROSS_COMPILE prefix for cross compiler and tools [none] > >> LIBCC compiler runtime library [detected] > >> > >> Use these variables to override the choices made by configure. > >> > >> ("What? You just said that CFLAGS should be on command line! > >> Now you are saying it should be in the environment! > >> What it is?") > > > > The behavior is the same as autoconf: they're accepted either as > > environment variables or on the configure command line. Some users do: > > > > CFLAGS=... ./configure ... > > > > and others do: > > > > ./configure CFLAGS=... ... > > I tested both and they indeed work identically. > > > I can add some language to the help text to make it explicit that > > either is accepted. > > I'm sending you a patch with amended --help text. I'd like to continue discussion of whether the current behavior is actually desirable. It's quite possible that we should move the configure-generated CFLAGS to a separate variable where they're not clobbered by setting of CFLAGS by the user at make time. Rich