Re: Compilation issue with spin_lock_bh

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

 



Fawad Lateef wrote:

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/


So I guess the best way is to use EXTRA_CFLAGS instead of CFLAGS. This was we would not be tampering with the kernel makefile CFLAGS.

Thanks Fawad.

Sanjay Acharya


--
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