Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Sat, 24 Oct 2015 15:37:53 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Having hard time adding to CFLAGS

On Fri, Oct 23, 2015 at 08:47:18AM +0200, Denys Vlasenko wrote:
> On Fri, Oct 23, 2015 at 7:16 AM, Rich Felker <dalias@...c.org> 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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.