Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151023040909.GD8645@brightrain.aerifal.cx>
Date: Fri, 23 Oct 2015 00:09:10 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: Having hard time adding to CFLAGS

On Thu, Oct 22, 2015 at 11:02:36PM -0400, Rich Felker wrote:
> > the attached patch makes this work, but i
> > consider -Os to be not part of 'needed'
> 
> > diff --git a/Makefile b/Makefile
> > index 844a017..f713286 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -94,22 +94,22 @@ crt/crt1.o crt/Scrt1.o crt/rcrt1.o src/ldso/dlstart.lo: $(wildcard arch/$(ARCH)/
> >  
> >  crt/rcrt1.o: src/ldso/dlstart.c
> >  
> > -crt/Scrt1.o crt/rcrt1.o: CFLAGS += -fPIC
> > +crt/Scrt1.o crt/rcrt1.o: CFLAGS_ALL += -fPIC
> 
> This is the correct fix. I was not aware that make variables set from
> the make command line would take precedence over the target-specific
> += concatenations. The intent has always been that editing CFLAGS
> should not break the build (unless you put really inapproriate stuff
> there, of course).

I've committed this with one change (omitting the -O3 thing that's
really optional) and another related fix.

Note however that overriding CFLAGS at make time is still a bad idea.
It will suppress all the warning options configure detected and other
useful but non-essential things like -fno-unwind-tables and
-fno-asynchronous-unwind-tables. We should probably discuss whether
this behavior is desirable. We could factor out all of the stuff
configure detects into a CFLAGS_AUTO and leave CFLAGS just containing
the user-provided options. Opinions?

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.