All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mdadm: fix CFLAGS invalid issue
@ 2015-09-11  5:51 wenzong.fan
  2015-10-14  2:27 ` wenzong fan
  0 siblings, 1 reply; 3+ messages in thread
From: wenzong.fan @ 2015-09-11  5:51 UTC (permalink / raw)
  To: openembedded-core

From: Wenzong Fan <wenzong.fan@windriver.com>

* 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 error caused by global CFLAGS:

  raid6check.c: In function 'check_stripes':
  raid6check.c:315:8: error: 'stripe_buf' may be used uninitialized \
  in this function [-Werror=maybe-uninitialized]

Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
---
 .../mdadm/files/mdadm-fix-ptest-build-error.patch  | 34 ++++++++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_3.3.4.bb         |  3 +-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-error.patch

diff --git a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-error.patch b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-error.patch
new file mode 100644
index 0000000..b2495c0
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-error.patch
@@ -0,0 +1,34 @@
+From d062030a36faa77193ac66b498a1ec704013dbb1 Mon Sep 17 00:00:00 2001
+From: Wenzong Fan <wenzong.fan@windriver.com>
+Date: Thu, 10 Sep 2015 03:52:20 -0400
+Subject: [PATCH] mdadm: fix ptest build error
+
+Initialize *stripe_buf as NULL to fix ptest build error:
+
+  raid6check.c: In function 'check_stripes':
+  raid6check.c:315:8: error: 'stripe_buf' may be used uninitialized \
+  in this function [-Werror=maybe-uninitialized]
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+---
+ raid6check.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/raid6check.c b/raid6check.c
+index cb8522e..e4a9ff0 100644
+--- a/raid6check.c
++++ b/raid6check.c
+@@ -312,7 +312,7 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
+ 	/* read the data and p and q blocks, and check we got them right */
+ 	int data_disks = raid_disks - 2;
+ 	int syndrome_disks = data_disks + is_ddf(layout) * 2;
+-	char *stripe_buf;
++	char *stripe_buf = NULL;
+ 
+ 	/* stripes[] is indexed by raid_disk and holds chunks from each device */
+ 	char **stripes = xmalloc(raid_disks * sizeof(char*));
+-- 
+1.9.1
+
diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
index 460a430..a8b4ee1 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
@@ -12,6 +12,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
            file://mdadm-3.2.2_fix_for_x32.patch \
            file://gcc-4.9.patch \
            file://mdadm-3.3.2_x32_abi_time_t.patch \
+           file://mdadm-fix-ptest-build-error.patch \
            file://run-ptest \
 	  "
 SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09"
@@ -21,7 +22,7 @@ CFLAGS += "-fno-strict-aliasing"
 
 inherit autotools-brokensep
 
-EXTRA_OEMAKE = "CHECK_RUN_DIR=0"
+EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
 # PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
 # prevents 64-bit userland from seeing this definition, instead defaulting
 # to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] mdadm: fix CFLAGS invalid issue
  2015-09-11  5:51 [PATCH] mdadm: fix CFLAGS invalid issue wenzong.fan
@ 2015-10-14  2:27 ` wenzong fan
  2015-10-14 10:55   ` Burton, Ross
  0 siblings, 1 reply; 3+ messages in thread
From: wenzong fan @ 2015-10-14  2:27 UTC (permalink / raw)
  To: openembedded-core

Ping ...

Thanks
Wenzong

On 09/11/2015 01:51 PM, wenzong.fan@windriver.com wrote:
> From: Wenzong Fan <wenzong.fan@windriver.com>
>
> * 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 error caused by global CFLAGS:
>
>    raid6check.c: In function 'check_stripes':
>    raid6check.c:315:8: error: 'stripe_buf' may be used uninitialized \
>    in this function [-Werror=maybe-uninitialized]
>
> Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
> ---
>   .../mdadm/files/mdadm-fix-ptest-build-error.patch  | 34 ++++++++++++++++++++++
>   meta/recipes-extended/mdadm/mdadm_3.3.4.bb         |  3 +-
>   2 files changed, 36 insertions(+), 1 deletion(-)
>   create mode 100644 meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-error.patch
>
> diff --git a/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-error.patch b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-error.patch
> new file mode 100644
> index 0000000..b2495c0
> --- /dev/null
> +++ b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-error.patch
> @@ -0,0 +1,34 @@
> +From d062030a36faa77193ac66b498a1ec704013dbb1 Mon Sep 17 00:00:00 2001
> +From: Wenzong Fan <wenzong.fan@windriver.com>
> +Date: Thu, 10 Sep 2015 03:52:20 -0400
> +Subject: [PATCH] mdadm: fix ptest build error
> +
> +Initialize *stripe_buf as NULL to fix ptest build error:
> +
> +  raid6check.c: In function 'check_stripes':
> +  raid6check.c:315:8: error: 'stripe_buf' may be used uninitialized \
> +  in this function [-Werror=maybe-uninitialized]
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
> +---
> + raid6check.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/raid6check.c b/raid6check.c
> +index cb8522e..e4a9ff0 100644
> +--- a/raid6check.c
> ++++ b/raid6check.c
> +@@ -312,7 +312,7 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets,
> + 	/* read the data and p and q blocks, and check we got them right */
> + 	int data_disks = raid_disks - 2;
> + 	int syndrome_disks = data_disks + is_ddf(layout) * 2;
> +-	char *stripe_buf;
> ++	char *stripe_buf = NULL;
> +
> + 	/* stripes[] is indexed by raid_disk and holds chunks from each device */
> + 	char **stripes = xmalloc(raid_disks * sizeof(char*));
> +--
> +1.9.1
> +
> diff --git a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
> index 460a430..a8b4ee1 100644
> --- a/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
> +++ b/meta/recipes-extended/mdadm/mdadm_3.3.4.bb
> @@ -12,6 +12,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.xz \
>              file://mdadm-3.2.2_fix_for_x32.patch \
>              file://gcc-4.9.patch \
>              file://mdadm-3.3.2_x32_abi_time_t.patch \
> +           file://mdadm-fix-ptest-build-error.patch \
>              file://run-ptest \
>   	  "
>   SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09"
> @@ -21,7 +22,7 @@ CFLAGS += "-fno-strict-aliasing"
>
>   inherit autotools-brokensep
>
> -EXTRA_OEMAKE = "CHECK_RUN_DIR=0"
> +EXTRA_OEMAKE = 'CHECK_RUN_DIR=0 CXFLAGS="${CFLAGS}"'
>   # PPC64 and MIPS64 uses long long for u64 in the kernel, but powerpc's asm/types.h
>   # prevents 64-bit userland from seeing this definition, instead defaulting
>   # to u64 == long in userspace. Define __SANE_USERSPACE_TYPES__ to get
>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mdadm: fix CFLAGS invalid issue
  2015-10-14  2:27 ` wenzong fan
@ 2015-10-14 10:55   ` Burton, Ross
  0 siblings, 0 replies; 3+ messages in thread
From: Burton, Ross @ 2015-10-14 10:55 UTC (permalink / raw)
  To: wenzong fan; +Cc: OE-core

[-- Attachment #1: Type: text/plain, Size: 162 bytes --]

On 14 October 2015 at 03:27, wenzong fan <wenzong.fan@windriver.com> wrote:

> Ping ...
>

This doesn't apply to master now, can you rebase please.

Ross

[-- Attachment #2: Type: text/html, Size: 578 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-14 10:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11  5:51 [PATCH] mdadm: fix CFLAGS invalid issue wenzong.fan
2015-10-14  2:27 ` wenzong fan
2015-10-14 10:55   ` Burton, Ross

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.