Re: [usb-storage] [PATCH 23/24] usb: change to new flag variable

From: matt mooney
Date: Fri Sep 24 2010 - 19:23:04 EST


On 13:28 Fri 24 Sep , matt mooney wrote:
> On 13:02 Fri 24 Sep , Matthew Dharm wrote:
> > On Fri, Sep 24, 2010 at 12:17:33PM -0700, matt mooney wrote:
> > > Replace EXTRA_CFLAGS with ccflags-y.
> >
> > > diff --git a/drivers/usb/storage/Makefile b/drivers/usb/storage/Makefile
> > > index ef7e5a8..786f086 100644
> > > --- a/drivers/usb/storage/Makefile
> > >
> +++ b/drivers/usb/storage/Makefile
> > > @@ -5,7 +5,7 @@
> > > # Rewritten to use lists instead of if-statements.
> > > #
> > >
> > > -EXTRA_CFLAGS := -Idrivers/scsi
> > > +ccflags-y := -Idrivers/scsi
> > >
> > > obj-$(CONFIG_USB_STORAGE) += usb-storage.o
> >
> > I don't really know anything about the new 'ccflags' stuff.. but my
> > instincts tell me that perhaps that should be
> > 'ccflags-$(CONFIG_USB_STORAGE)' rather than 'ccflags-y'?
>
> The flag has the same effect as EXTRA_CFLAGS in that it will be used to build
> all sources at the same hierarchical level (i.e., per directory not including
> subdirectories). I didn't want to change the semantics of the way the variable
> was being used, but after looking at the Kconfig it seems that would be a
> reasonable change. If only usb-storage needs the flag then it makes sense,
> though it seems that everything else in the directory relies on usb-storage
> anyway, but it gives it greater meaning knowing that only usb-storage relies on
> the flag, IMHO.
>
> >
> > Does it make a difference that usb-storage can be built-in or a loadable
> > module?
>
> That would make a difference because ccflags-m is not used, so the change is not
> possible.

I failed to mention earlier that there is a per file flag. If you really only
want usb-storage.o built with the flag, you can do:

CFLAGS_usb-storage.o := -Idrivers/scsi

-mfm
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/