[oe-commits] Tom Rini : mdadm: Update 3.1.2 to obey CFLAGS/LDFLAGS/etc
git version control
git at git.openembedded.org
Tue Apr 19 15:21:39 UTC 2011
Module: openembedded.git
Branch: master
Commit: ad388e996799cb56341f8b6318b853ab20b15dc2
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=ad388e996799cb56341f8b6318b853ab20b15dc2
Author: Tom Rini <tom_rini at mentor.com>
Date: Tue Apr 19 08:10:51 2011 -0700
mdadm: Update 3.1.2 to obey CFLAGS/LDFLAGS/etc
The Makefile in mdadm 3.1.2 doesn't obey what we're telling it.
We first need to shove the extra parts of ${CC} into the ${CXFLAGS}
variable and then our normal CFLAGS. We need to do something similar
for LDFLAGS. Finally, we need to drop -Werror to get it building
again.
Signed-off-by: Tom Rini <tom_rini at mentor.com>
---
recipes/mdadm/mdadm-3.1.2/remove-werror.patch | 17 +++++++++++++++++
recipes/mdadm/mdadm.inc | 3 +--
recipes/mdadm/mdadm_3.1.2.bb | 6 +++++-
3 files changed, 23 insertions(+), 3 deletions(-)
diff --git a/recipes/mdadm/mdadm-3.1.2/remove-werror.patch b/recipes/mdadm/mdadm-3.1.2/remove-werror.patch
new file mode 100644
index 0000000..71c6bf8
--- /dev/null
+++ b/recipes/mdadm/mdadm-3.1.2/remove-werror.patch
@@ -0,0 +1,17 @@
+---
+ Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: mdadm-3.1.2/Makefile
+===================================================================
+--- mdadm-3.1.2.orig/Makefile
++++ mdadm-3.1.2/Makefile
+@@ -42,7 +42,7 @@ KLIBC_GCC = gcc -nostdinc -iwithprefix i
+
+ CC = $(CROSS_COMPILE)gcc
+ CXFLAGS = -ggdb
+-CWFLAGS = -Wall -Werror -Wstrict-prototypes
++CWFLAGS = -Wall -Wstrict-prototypes
+ ifdef WARN_UNUSED
+ CWFLAGS += -Wp,-D_FORTIFY_SOURCE=2 -O
+ endif
diff --git a/recipes/mdadm/mdadm.inc b/recipes/mdadm/mdadm.inc
index 2e91d1e..74a9f02 100644
--- a/recipes/mdadm/mdadm.inc
+++ b/recipes/mdadm/mdadm.inc
@@ -13,9 +13,8 @@ inherit autotools
INHIBIT_AUTO_STAGE = "1"
-do_compile() {
+do_compile_prepend() {
export CROSS_COMPILE="${TARGET_PREFIX}"
- oe_runmake
}
do_install() {
diff --git a/recipes/mdadm/mdadm_3.1.2.bb b/recipes/mdadm/mdadm_3.1.2.bb
index 9997187..0c72cdf 100644
--- a/recipes/mdadm/mdadm_3.1.2.bb
+++ b/recipes/mdadm/mdadm_3.1.2.bb
@@ -2,7 +2,11 @@ require mdadm.inc
SRC_URI[mdadm-3.1.2.md5sum] = "c5a39f38c465229767a5af2a4eb81bef"
SRC_URI[mdadm-3.1.2.sha256sum] = "ff831c433c386039163ac09c84b02132a8bb8ad5a0bdb571ff91211980124d68"
-PR = "r0"
+SRC_URI += "file://remove-werror.patch"
+
+EXTRA_OEMAKE="'CXFLAGS=${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${CFLAGS} -fno-strict-aliasing' 'LDFLAGS=${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} ${LDFLAGS}'"
+
+PR = "r1"
PACKAGES += "${PN}-udev"
RRECOMMENDS_${PN} = "${PN}-udev"
More information about the Openembedded-commits
mailing list