Enable patch application for mdadm, add patch to fix compilation (bug #381089)
authorSebastian Pipping <sebastian@pipping.org>
Tue, 30 Aug 2011 12:44:06 +0000 (14:44 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Tue, 30 Aug 2011 12:45:18 +0000 (14:45 +0200)
ChangeLog
gen_compile.sh
patches/mdadm/3.1.4/mdadm-3.1.4-z-now.patch [new file with mode: 0644]

index 0f04500fe107af32c1e5932b517431633843670e..6b00bda04ebbf4a0937705cdd0a9b112051f08c1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,11 @@
 # Distributed under the GPL v2
 # $Id$
 
+  30 Aug 2011; Sebastian Pipping <sping@gentoo.org>
+  +patches/mdadm/3.1.4/mdadm-3.1.4-z-now.patch, gen_compile.sh:
+  Enable patch application for mdadm, add patch to fix compilation (bug
+  #381089)
+
   28 Aug 2011; Fabio Erculiani <lxnay@gentoo.org> defaults/initrd.scripts,
   defaults/linuxrc, doc/genkernel.8.txt:
   Add basic support to AUFS2, requires kernel with aufs module or built-in
index ae66ca2c9fa58ea085f6a0fc9e4a933fdc6aca89..2f8a71acfd2d52957b8f6db807b49f913bbb6562 100755 (executable)
@@ -475,6 +475,7 @@ compile_mdadm() {
                        gen_die 'MDADM directory ${MDADM_DIR} is invalid!'
 
                cd "${MDADM_DIR}"
+               apply_patches mdadm ${MDADM_VER}
                sed -i "/^CFLAGS = /s:^CFLAGS = \(.*\)$:CFLAGS = -Os:" Makefile
                sed -i "/^CXFLAGS = /s:^CXFLAGS = \(.*\)$:CXFLAGS = -Os:" Makefile
                sed -i "/^CWFLAGS = /s:^CWFLAGS = \(.*\)$:CWFLAGS = -Wall:" Makefile
diff --git a/patches/mdadm/3.1.4/mdadm-3.1.4-z-now.patch b/patches/mdadm/3.1.4/mdadm-3.1.4-z-now.patch
new file mode 100644 (file)
index 0000000..82b0b3e
--- /dev/null
@@ -0,0 +1,26 @@
+From 5296bc73a66e9eee31ba79d26aa02543205a7a26 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Tue, 30 Aug 2011 14:38:14 +0200
+Subject: [PATCH] Replace "-z now" by "-Wl,-z,now" to fix compilation with GCC
+ 4.4.5 on Alpha (bug #331653)
+
+---
+ Makefile |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index e2c65a5..0cc9a87 100644
+--- a/Makefile
++++ b/Makefile
+@@ -167,7 +167,7 @@ mdmon.O2 : $(MON_SRCS) mdadm.h mdmon.h
+ # use '-z now' to guarantee no dynamic linker interactions with the monitor thread
+ mdmon : $(MON_OBJS)
+-      $(CC) $(LDFLAGS) $(MON_LDFLAGS) -z now -o mdmon $(MON_OBJS) $(LDLIBS)
++      $(CC) $(LDFLAGS) $(MON_LDFLAGS) -Wl,-z,now -o mdmon $(MON_OBJS) $(LDLIBS)
+ msg.o: msg.c msg.h
+ test_stripe : restripe.c mdadm.h
+-- 
+1.7.6.1
+