Re: Compilation issue with spin_lock_bh

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

 



On 1/14/06, Sanjay Acharya <sacharya@xxxxxxxxxxxxx> wrote:
> Fawad Lateef wrote:
>
> >It will be helpfull to get to the problem if you send your makefile !
> >By the way I think your CFLAGS = l.  assignment will be overriding the
> >default flags added (might be some which were added by the kernel
> >makefile) and changing it to CFLAGS += l. adding another flag and also
> >keeping the previous flags (CMIIW)
> >
>     I have shown my Makefile contents below. I printed the CFLAGS value
> before setting it, but it does not show any data in it. Do let me know
> if you see any anomality in my makefile.
>
> ---
> CFLAGS += -I.
> CFLAGS += -Wall
>
> obj-m += test.o
>
> all:
>     make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
>
> clean:
>     rm -f *o *ko *mod.c
> ---
>

I am now pretty sure that CFLAGS = <flag> will override the kernel
Makefile CFLAGS, As I just added in one of my module's Makefile this
CFLAGS = -g and it start giving the same error as yours and when I
added CFLAGS += -g it compile successfully. And also what I saw in
kernel Makefile it first assigning CFLAGS directly by using = and
later all the additions are using +=

And as the 2.6 kernel's module compilation mechanism requires
compilation through kernel Makefile so CFLAGS defined by kernel must
be used in module's Makefile !

--
Fawad Lateef

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux