Re: [PATCH] makedumpfile: honor the CFLAGS from environment variables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 29, 2019 at 6:33 AM Kazuhito Hagio <k-hagio@xxxxxxxxxxxxx> wrote:
>
> On 1/28/2019 4:51 PM, Kazuhito Hagio wrote:
> > On 1/28/2019 5:59 AM, Simon Horman wrote:
> > > On Mon, Jan 28, 2019 at 06:50:45PM +0800, Kairui Song wrote:
> > > > This make it easier for passing extra cflags, for example hardening
> > > > flags could be passed in with enviroment variable.
> > > >
> > > > Signed-off-by: Kairui Song <kasong@xxxxxxxxxx>
> > >
> > > Thanks, I like this a lot.
> > >
> > > I would like to wake a little to see if there is review from
> > > others before applying this.
> >
> > I like this, too, and sorry to steal this... :-)
> >
> > >
> > > > ---
> > > >  Makefile | 10 +++++-----
> > > >  1 file changed, 5 insertions(+), 5 deletions(-)
> > > >
> > > > diff --git a/Makefile b/Makefile
> > > > index 612b9d0..b511a78 100644
> > > > --- a/Makefile
> > > > +++ b/Makefile
> > > > @@ -8,11 +8,11 @@ ifeq ($(strip $CC),)
> > > >  CC       = gcc
> > > >  endif
> > > >
> > > > -CFLAGS = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
> > > > -   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \
> > > > -   -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"'
> > > > -CFLAGS_ARCH      = -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
> > > > -             -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> > > > +CFLAGS_ARCH = $(CFLAGS) -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
> > > > +       -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> >
> > This expands the whole CFLAGS in advance and duplicates some flags,
> > so we can use ":=" instead of "=" for CFLAGS_ARCH ?
> > If this is fine, I'll fix it when mergiKazuhito Hagio <k-hagio@xxxxxxxxxxxxx>ng.
>
> or it might be good to remove some redundant flags like this
> at this opportunity.
>
> CFLAGS_BASE := $(CFLAGS) -g -O2 -Wall -D_FILE_OFFSET_BITS=64 \
>                 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> CFLAGS      := $(CFLAGS_BASE) -DVERSION='"$(VERSION)"' -DRELEASE_DATE='"$(DATE)"'
> CFLAGS_ARCH := $(CFLAGS_BASE)

Thanks for the suggestion, it is a good idea, simplifies the CFLAGS definition.
Will send a V2 update.

--
Best Regards,
Kairui Song

_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec



[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux