Control: tag -1 patch

     - Patch Makefile to select correct shipped module depending on kernel
       configuration.

This doesn't work because you've mixed up the running and target kernel
versions.  And you went to great lengths to do something that kbuild
does for us already!

Here's my version, tested as working for both target versions
3.2.0-4-686-pae and 3.2.0-4-amd64 with running version 3.2.0-4-amd64.

Ben.

-- 
Ben Hutchings
compatible: Gracefully accepts erroneous data from any source
From: Ben Hutchings <b...@decadent.org.uk>
Subject: Select wlc_hybrid.o based on the target kernel architecture
Bug-Debian: http://bugs.debian.org/651787

--- a/amd64/Makefile
+++ b/amd64/Makefile
@@ -120,7 +120,23 @@
 EXTRA_CFLAGS       += -I$(src)/src/wl/sys -I$(src)/src/wl/phy
 #EXTRA_CFLAGS       += -DBCMDBG_ASSERT
 
-EXTRA_LDFLAGS      := $(src)/lib/wlc_hybrid.o_shipped
+# Check for a config symbol that should always be defined, so we don't
+# fail on 'make clean' which doesn't include .config
+ifeq ($(CONFIG_NET),y)
+    ifeq ($(CONFIG_X86_32),y)
+        SHIPPED=wlc_hybrid.o_i386
+        $(info Kernel architecture is X86_32)
+    else
+        ifeq ($(CONFIG_X86_64),y)
+            SHIPPED=wlc_hybrid.o_amd64
+            $(info Kernel architecture is X86_64)
+        else # Error!
+            $(error Unsupported kernel architecture)
+        endif
+    endif
+endif
+
+EXTRA_LDFLAGS      := $(src)/lib/$(SHIPPED)
 
 all:
 	KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to