summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2015-10-15 23:24:14 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-11-25 08:08:09 +0000
commit82107b120947171293d8aed839c2144139951828 (patch)
tree1a12375c38579f59397c6cabbe5d9bcf31d47c97 /meta/recipes-extended
parentd8adfd28f71136e67fffbf79c32384a81ef29676 (diff)
downloadpoky-82107b120947171293d8aed839c2144139951828.tar.gz
mdadm: fix CFLAGS and ptest issues
* Pass global CFLAGS to build: The CFLAGS does not pass to build at all since it was redefined by mdadm Makefile: CFLAGS = $(CWFLAGS) $(CXFLAGS) ... This could be done by setting 'CXFLAGS="${CFLAGS}"'. * Also fix ptest build errors caused by global CFLAGS: raid6check.c:352:2: error: ignoring return value of posix_memalign, \ declared with attribute warn_unused_result [-Werror=unused-result] raid6check.c:315:8: error: 'stripe_buf' may be used uninitialized \ in this function [-Werror=maybe-uninitialized] (From OE-Core rev: 60f71fa4da86ca4c7c37115c343db194a3b7b47b) Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-extended')
-rw-r--r--meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch50
-rw-r--r--meta/recipes-extended/mdadm/mdadm_3.3.4.bb3
2 files changed, 52 insertions, 1 deletions
diff --git a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
new file mode 100644
index 0000000000..f7c55142f6
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
@@ -0,0 +1,50 @@
1From f3acf8499a4cc400206c5c56f0a6c69192ed55de Mon Sep 17 00:00:00 2001
2From: Wenzong Fan <wenzong.fan@windriver.com>
3Date: Sat, 7 Nov 2015 04:21:17 -0500
4Subject: [PATCH] mdadm: fix ptest build errors
5
6Check return value for posix_memalign() to fix ptest build error:
7
8 raid6check.c:352:2: error: ignoring return value of posix_memalign, \
9 declared with attribute warn_unused_result [-Werror=unused-result]
10
11Initialize *stripe_buf as NULL to fix ptest build error:
12
13 raid6check.c: In function 'check_stripes':
14 raid6check.c:315:8: error: 'stripe_buf' may be used uninitialized \
15 in this function [-Werror=maybe-uninitialized]
16
17Upstream-Status: Pending
18
19Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
20---
21 raid6check.c | 6 ++++--
22 1 file changed, 4 insertions(+), 2 deletions(-)
23
24diff --git a/raid6check.c b/raid6check.c
25index cb8522e..9462bcf 100644
26--- a/raid6check.c
27+++ b/raid6check.c
28@@ -312,7 +312,7 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
29 /* read the data and p and q blocks, and check we got them right */
30 int data_disks = raid_disks - 2;
31 int syndrome_disks = data_disks + is_ddf(layout) * 2;
32- char *stripe_buf;
33+ char *stripe_buf = NULL;
34
35 /* stripes[] is indexed by raid_disk and holds chunks from each device */
36 char **stripes = xmalloc(raid_disks * sizeof(char*));
37@@ -349,7 +349,9 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
38 if (!tables_ready)
39 make_tables();
40
41- posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size);
42+ if (posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size) != 0)
43+ goto exitCheck;
44+
45 block_index_for_slot += 2;
46 blocks += 2;
47 blocks_page += 2;
48--
491.9.1
50
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
index 11981670e5..099361181e 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
@@ -13,6 +13,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
13 file://gcc-4.9.patch \ 13 file://gcc-4.9.patch \
14 file://mdadm-3.3.2_x32_abi_time_t.patch \ 14 file://mdadm-3.3.2_x32_abi_time_t.patch \
15 file://0001-Fix-typo-in-comparision.patch \ 15 file://0001-Fix-typo-in-comparision.patch \
16 file://mdadm-fix-ptest-build-errors.patch \
16 file://run-ptest \ 17 file://run-ptest \
17 " 18 "
18SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09" 19SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09"
@@ -22,7 +23,7 @@ CFLAGS += "-fno-strict-aliasing"
22 23
23inherit autotools-brokensep 24inherit autotools-brokensep
24 25
25EXTRA_OEMAKE = "CHECK_RUN_DIR=0" 26EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
26# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h 27# PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
27# prevents 64-bit userland from seeing this definition, instead defaulting 28# prevents 64-bit userland from seeing this definition, instead defaulting
28# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get 29# to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get