Search Linux Wireless

[PATCH 3/4] compat: avoid NOSTDINC_FLAGS during modpost

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

 



From: Luis R. Rodriguez <mcgrof@xxxxxxxxxxxxx>

modpost, the second part of module building, does not
use NOSTDINC_FLAGS and friends so all the hackery we did
to use it to prefer our header files and include compat-2.6.h
will not work during modpost for older kernels. We don't really
need all that stuff during modpost even for newer kernels so
just avoid it all together.

Signed-off-by: Luis R. Rodriguez <mcgrof@xxxxxxxxxxxxx>
---
 Makefile |   27 ++++++++++++++++-----------
 1 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index fdcff5c..d96d098 100644
--- a/Makefile
+++ b/Makefile
@@ -18,6 +18,22 @@ export COMPAT_BASE_TREE := "linux-next.git"
 # working with.
 export COMPAT_BASE_TREE_VERSION := "next-20100517"
 export COMPAT_VERSION := $(shell git describe)
+
+else
+# By stuffing this hear we avoid using
+# this hackery on modpost, the 2nd section of module building.
+#
+# This hack lets us put our include path first than the kernel's
+# when building our compat modules. Your own makefile would look
+# the same.
+NOSTDINC_FLAGS := -I$(M)/include/ \
+	-include $(M)/include/linux/compat-2.6.h \
+	$(CFLAGS) \
+	-DCOMPAT_BASE_TREE="\"$(COMPAT_BASE_TREE)\"" \
+	-DCOMPAT_BASE_TREE_VERSION="\"$(COMPAT_BASE_TREE_VERSION)\"" \
+	-DCOMPAT_PROJECT="\"Generic kernel\"" \
+	-DCOMPAT_VERSION="\"$(COMPAT_VERSION)\""
+
 endif
 
 # to check config and compat autoconf
@@ -31,17 +47,6 @@ export MAKE
 
 obj-y += compat/
 
-# This hack lets us put our include path first than the kernel's
-# when building our compat modules. Your own makefile would look
-# the same.
-NOSTDINC_FLAGS := -I$(M)/include/ \
-	-include $(M)/include/linux/compat-2.6.h \
-	$(CFLAGS) \
-	-DCOMPAT_BASE_TREE="\"$(COMPAT_BASE_TREE)\"" \
-	-DCOMPAT_BASE_TREE_VERSION="\"$(COMPAT_BASE_TREE_VERSION)\"" \
-	-DCOMPAT_PROJECT="\"Generic kernel\"" \
-	-DCOMPAT_VERSION="\"$(COMPAT_VERSION)\""
-
 all: $(COMPAT_CONFIG)
 
 modules: $(COMPAT_CONFIG) $(COMPAT_AUTOCONF)
-- 
1.7.4.15.g7811d

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux