Skip to contentSkip to conversation

madwifi-ng_r3837: Fix for LDFLAGS / GNU_HASH QA

PATCH In review [email protected] 2 participants 4 messages Apr 26, 2009 – Apr 27, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 madwifi-ng_r3837: Fix for LDFLAGS / GNU_HASH QA

Submit LDFLAGS variable to make.
Remove the cleaning of LDFLAGS in the binary Makefiles. Unset LDFLAGS for the kernel modules compile.

Compile tested on powerpc (mpc8313e-rdb).

recipes/madwifi/files/respect-ldflags.patch new file +39 -0
new file mode 100644
index 0000000..1e5e360
@@ -0,0 +1,39 @@
+Index: madwifi-trunk-r3837-20080802/Makefile
+===================================================================
+--- madwifi-trunk-r3837-20080802.orig/Makefile	2009-04-27 00:34:19.000000000 +0200
++++ madwifi-trunk-r3837-20080802/Makefile	2009-04-27 00:34:31.000000000 +0200
+@@ -61,7 +61,7 @@
+ 		$(MAKE) -C $$i || exit 1; \
+ 	done
+ else
+-	$(MAKE) -C $(KERNELPATH) SUBDIRS=$(shell pwd) modules
++	$(MAKE) -C $(KERNELPATH) LDFLAGS= SUBDIRS=$(shell pwd) modules
+ endif
+ 
+ $(addprefix $(obj)/, $(obj-y:/=)): $(TOP)/svnversion.h
+Index: madwifi-trunk-r3837-20080802/tools/Makefile
+===================================================================
+--- madwifi-trunk-r3837-20080802.orig/tools/Makefile	2009-04-27 00:34:19.000000000 +0200
++++ madwifi-trunk-r3837-20080802/tools/Makefile	2009-04-27 00:34:36.000000000 +0200
+@@ -55,7 +55,7 @@
+ INCS = -I. -I$(HAL) -I$(TOP) -I$(ATH_HAL)
+ CFLAGS = -g -O2 -Wall
+ ALL_CFLAGS = $(CFLAGS) $(INCS)
+-LDFLAGS =
++#LDFLAGS =
+ 
+ all: all-subdirs $(PROGRAMS)
+ 
+Index: madwifi-trunk-r3837-20080802/tools/ath_info/Makefile
+===================================================================
+--- madwifi-trunk-r3837-20080802.orig/tools/ath_info/Makefile	2009-04-27 00:34:19.000000000 +0200
++++ madwifi-trunk-r3837-20080802/tools/ath_info/Makefile	2009-04-27 00:34:40.000000000 +0200
+@@ -5,7 +5,7 @@
+ USER_CROSS_COMPILE ?= $(CROSS_COMPILE)
+ CC = $(USER_CROSS_COMPILE)gcc
+ CFLAGS = -g -O2 -W -Wall
+-LDFLAGS =
++#LDFLAGS =
+ PREFIX = /usr/local
+ BINDIR = $(PREFIX)/bin
+ MANDIR = $(PREFIX)/share/man
recipes/madwifi/madwifi-ng_r.inc +6 -5
index 8fc3065..59f8bc5 100644
@@ -4,7 +4,7 @@ PRIORITY = "optional"
 LICENSE = "GPL"
 RDEPENDS = "kernel (${KERNEL_VERSION})"
 DEPENDS = "virtual/kernel"
-PR ="r5"
+PR ="r6"
 
 WACKELF_SRC_URI = ""
 WACKELF_SRC_URI_ixp4xx = " file://20-xscale-VFP-wackelf.patch;patch=1"
@@ -21,19 +21,19 @@ S = "${WORKDIR}/${SRCNAME}-${PV}"
 
 inherit module-base
 
-ARCH_efika="powerpc"
 ARCH_dht-walnut="ppc"
+ARCH_efika="powerpc"
 ARCH_magicbox="ppc"
+ARCH_mpc8313e-rdb="powerpc"
+ARCH_mpc8315e-rdb="powerpc"
 ARCH_sequoia="ppc"
 
-EXTRA_OEMAKE = "LDFLAGS= KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX}"
+EXTRA_OEMAKE = "KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX}"
 
 EXTRA_OEMAKE_prepend_ixp4xxle = "TARGET=xscale-le-elf "
 EXTRA_OEMAKE_prepend_ixp4xxbe = "TARGET=xscale-be-elf "
 
-
 do_compile() {
-	unset LDFLAGS
 	oe_runmake all
 }
 
@@ -61,3 +61,4 @@ fi
 PACKAGES += "${PN}-modules ${PN}-tools"
 FILES_${PN}-modules = "/lib/modules/"
 FILES_${PN}-tools = "/usr/"
+
recipes/madwifi/madwifi-ng_r3837-20080802.bb +3 -1
index bf14c33..d79ff3c 100644
@@ -12,7 +12,9 @@ require madwifi-ng_r.inc
 WACKELF_SRC_URI_ixp4xx =          " file://20-xscale-VFP-wackelf-v2.patch;patch=1"
 WACKELF_SRC_URI_compulab-pxa270 = " file://20-xscale-VFP-wackelf-v2.patch;patch=1"
 
+SRC_URI += "file://respect-ldflags.patch;patch=1"
+
 SRCNAME = "madwifi-trunk"
 
 # PR set after the include, to override what's set in the included file.
-PR = "r1"
+PR = "r2"
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · On Sun, Apr 26, 2009 at 04:35:04PM -0700, [email protected] wrote:

Submit LDFLAGS variable to make.
Remove the cleaning of LDFLAGS in the binary Makefiles. Unset LDFLAGS for the kernel modules compile.

Compile tested on powerpc (mpc8313e-rdb).

It's not explicit in the patch, but I assume that what happens now is that LDFLAGS is used for userland utils (good) and the kernel already makes sure this won't leak in as it doesn't pay attention to LDFLAGS at all. Right? Or some similar explanation? If so:

Quoted 111 lines
recipes/madwifi/files/respect-ldflags.patch new file +39 -0
new file mode 100644
index 0000000..1e5e360
@@ -0,0 +1,39 @@
+Index: madwifi-trunk-r3837-20080802/Makefile
+===================================================================
+--- madwifi-trunk-r3837-20080802.orig/Makefile	2009-04-27 00:34:19.000000000 +0200
++++ madwifi-trunk-r3837-20080802/Makefile	2009-04-27 00:34:31.000000000 +0200
+@@ -61,7 +61,7 @@
+ 		$(MAKE) -C $$i || exit 1; \
+ 	done
+ else
+-	$(MAKE) -C $(KERNELPATH) SUBDIRS=$(shell pwd) modules
++	$(MAKE) -C $(KERNELPATH) LDFLAGS= SUBDIRS=$(shell pwd) modules
+ endif
+ 
+ $(addprefix $(obj)/, $(obj-y:/=)): $(TOP)/svnversion.h
+Index: madwifi-trunk-r3837-20080802/tools/Makefile
+===================================================================
+--- madwifi-trunk-r3837-20080802.orig/tools/Makefile	2009-04-27 00:34:19.000000000 +0200
++++ madwifi-trunk-r3837-20080802/tools/Makefile	2009-04-27 00:34:36.000000000 +0200
+@@ -55,7 +55,7 @@
+ INCS = -I. -I$(HAL) -I$(TOP) -I$(ATH_HAL)
+ CFLAGS = -g -O2 -Wall
+ ALL_CFLAGS = $(CFLAGS) $(INCS)
+-LDFLAGS =
++#LDFLAGS =
+ 
+ all: all-subdirs $(PROGRAMS)
+ 
+Index: madwifi-trunk-r3837-20080802/tools/ath_info/Makefile
+===================================================================
+--- madwifi-trunk-r3837-20080802.orig/tools/ath_info/Makefile	2009-04-27 00:34:19.000000000 +0200
++++ madwifi-trunk-r3837-20080802/tools/ath_info/Makefile	2009-04-27 00:34:40.000000000 +0200
+@@ -5,7 +5,7 @@
+ USER_CROSS_COMPILE ?= $(CROSS_COMPILE)
+ CC = $(USER_CROSS_COMPILE)gcc
+ CFLAGS = -g -O2 -W -Wall
+-LDFLAGS =
++#LDFLAGS =
+ PREFIX = /usr/local
+ BINDIR = $(PREFIX)/bin
+ MANDIR = $(PREFIX)/share/man
recipes/madwifi/madwifi-ng_r.inc +6 -5
index 8fc3065..59f8bc5 100644
@@ -4,7 +4,7 @@ PRIORITY = "optional"
 LICENSE = "GPL"
 RDEPENDS = "kernel (${KERNEL_VERSION})"
 DEPENDS = "virtual/kernel"
-PR ="r5"
+PR ="r6"
 
 WACKELF_SRC_URI = ""
 WACKELF_SRC_URI_ixp4xx = " file://20-xscale-VFP-wackelf.patch;patch=1"
@@ -21,19 +21,19 @@ S = "${WORKDIR}/${SRCNAME}-${PV}"
 
 inherit module-base
 
-ARCH_efika="powerpc"
 ARCH_dht-walnut="ppc"
+ARCH_efika="powerpc"
 ARCH_magicbox="ppc"
+ARCH_mpc8313e-rdb="powerpc"
+ARCH_mpc8315e-rdb="powerpc"
 ARCH_sequoia="ppc"
 
-EXTRA_OEMAKE = "LDFLAGS= KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX}"
+EXTRA_OEMAKE = "KERNELPATH=${STAGING_KERNEL_DIR} KERNELRELEASE=${KERNEL_VERSION} TOOLPREFIX=${TARGET_PREFIX}"
 
 EXTRA_OEMAKE_prepend_ixp4xxle = "TARGET=xscale-le-elf "
 EXTRA_OEMAKE_prepend_ixp4xxbe = "TARGET=xscale-be-elf "
 
-
 do_compile() {
-	unset LDFLAGS
 	oe_runmake all
 }
 
@@ -61,3 +61,4 @@ fi
 PACKAGES += "${PN}-modules ${PN}-tools"
 FILES_${PN}-modules = "/lib/modules/"
 FILES_${PN}-tools = "/usr/"
+
recipes/madwifi/madwifi-ng_r3837-20080802.bb +3 -1
index bf14c33..d79ff3c 100644
@@ -12,7 +12,9 @@ require madwifi-ng_r.inc
 WACKELF_SRC_URI_ixp4xx =          " file://20-xscale-VFP-wackelf-v2.patch;patch=1"
 WACKELF_SRC_URI_compulab-pxa270 = " file://20-xscale-VFP-wackelf-v2.patch;patch=1"
 
+SRC_URI += "file://respect-ldflags.patch;patch=1"
+
 SRCNAME = "madwifi-trunk"
 
 # PR set after the include, to override what's set in the included file.
-PR = "r1"
+PR = "r2"

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

Signature · 1 line
Tom Rini
#2 lore raw

Hello Tom,

thanks for your review, and conditional ack, let me try to make it unconditional:

Quoted 6 lines · Tom Rini
Quoted 4 lines · On Sun, Apr 26, 2009 at 04:35:04PM -0700, [email protected] wrote:

Submit LDFLAGS variable to make.
Remove the cleaning of LDFLAGS in the binary Makefiles. Unset LDFLAGS for the kernel modules compile.

Quoted 9 lines
Quoted 1 line

Compile tested on powerpc (mpc8313e-rdb).

It's not explicit in the patch, but I assume that what happens now is that LDFLAGS is used for userland utils (good) and the kernel already makes sure this won't leak in as it doesn't pay attention to LDFLAGS at all.  Right?  Or some similar explanation?  If so:

Yes, that's what I did. Let me explain the diff in English:

First we had the recipe clearing the LDFLAGS altogether, I reverted that:

do_compile() {
- unset LDFLAGS
oe_runmake all
}

I then made sure the LDFLAGS are indeed cleared for the kernel case (i.e. this is old behaviour):

+-      $(MAKE) -C $(KERNELPATH) SUBDIRS=$(shell pwd) modules
++      $(MAKE) -C $(KERNELPATH) LDFLAGS= SUBDIRS=$(shell pwd) modules

I then made sure the user tools do get the LDFLAGS in the Makefiles:

+-LDFLAGS =
++#LDFLAGS =

Then rebuild recipe for powerpc. Looked good. Don't have Wifi h/w to test madwifi at this point.

Regards,

Signature · 1 line
Leon
#3 lore raw
Quoted 19 lines · Leon Woestenberg

Hello Tom,

thanks for your review, and conditional ack, let me try to make it unconditional:

Quoted 13 lines · Tom Rini
Quoted 5 lines · On Sun, Apr 26, 2009 at 04:35:04PM -0700, [email protected] wrote:

Submit LDFLAGS variable to make.
Remove the cleaning of LDFLAGS in the binary Makefiles. Unset LDFLAGS for the kernel modules compile.

Compile tested on powerpc (mpc8313e-rdb).

It's not explicit in the patch, but I assume that what happens now is that LDFLAGS is used for userland utils (good) and the kernel already makes sure this won't leak in as it doesn't pay attention to LDFLAGS at all.  Right?  Or some similar explanation?  If so:

Quoted 4 lines
Quoted 2 lines

Yes, that's what I did. Let me explain the diff in English:

Thanks, unconditioned ack :)

Signature · 1 line
Tom Rini