* [PATCH 0/1 v2] mdadm: fix CFLAGS and ptest issues
@ 2015-11-09 1:16 wenzong.fan
2015-11-09 1:26 ` [PATCH 1/1 " wenzong.fan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: wenzong.fan @ 2015-11-09 1:16 UTC (permalink / raw)
To: openembedded-core
From: Wenzong Fan <wenzong.fan@windriver.com>
V2 change:
* also fix another ptest error while building poky-lsb:
raid6check.c:352:2: error: ignoring return value of posix_memalign, \
declared with attribute warn_unused_result [-Werror=unused-result]
The following changes since commit fc45deac89ef63ca1c44e763c38ced7dfd72cbe1:
build-appliance-image: Update to jethro head revision (2015-11-03 14:03:03 +0000)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib wenzong/mdadm
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/mdadm
Wenzong Fan (1):
mdadm: fix CFLAGS and ptest issues
.../mdadm/files/mdadm-fix-ptest-build-errors.patch | 50 ++++++++++++++++++++++
meta/recipes-extended/mdadm/mdadm_3.3.4.bb | 3 +-
2 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch
--
1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/1 v2] mdadm: fix CFLAGS and ptest issues 2015-11-09 1:16 [PATCH 0/1 v2] mdadm: fix CFLAGS and ptest issues wenzong.fan @ 2015-11-09 1:26 ` wenzong.fan 2015-11-09 1:30 ` [PATCH 0/1 " wenzong fan 2015-11-09 1:33 ` wenzong fan 2 siblings, 0 replies; 4+ messages in thread From: wenzong.fan @ 2015-11-09 1:26 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 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] Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> --- .../mdadm/files/mdadm-fix-ptest-build-errors.patch | 50 ++++++++++++++++++++++ meta/recipes-extended/mdadm/mdadm_3.3.4.bb | 3 +- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch 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 0000000..f7c5514 --- /dev/null +++ b/meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch @@ -0,0 +1,50 @@ +From f3acf8499a4cc400206c5c56f0a6c69192ed55de Mon Sep 17 00:00:00 2001 +From: Wenzong Fan <wenzong.fan@windriver.com> +Date: Sat, 7 Nov 2015 04:21:17 -0500 +Subject: [PATCH] mdadm: fix ptest build errors + +Check return value for posix_memalign() to fix ptest build error: + + raid6check.c:352:2: error: ignoring return value of posix_memalign, \ + declared with attribute warn_unused_result [-Werror=unused-result] + +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 | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/raid6check.c b/raid6check.c +index cb8522e..9462bcf 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*)); +@@ -349,7 +349,9 @@ int check_stripes(struct mdinfo *info, int *source, unsigned long long *offsets, + if (!tables_ready) + make_tables(); + +- posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size); ++ if (posix_memalign((void**)&stripe_buf, 4096, raid_disks * chunk_size) != 0) ++ goto exitCheck; ++ + block_index_for_slot += 2; + blocks += 2; + blocks_page += 2; +-- +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 1198167..0993611 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 \ file://gcc-4.9.patch \ file://mdadm-3.3.2_x32_abi_time_t.patch \ file://0001-Fix-typo-in-comparision.patch \ + file://mdadm-fix-ptest-build-errors.patch \ file://run-ptest \ " SRC_URI[md5sum] = "7ca8b114710f98f53f20c5787b674a09" @@ -22,7 +23,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] 4+ messages in thread
* Re: [PATCH 0/1 v2] mdadm: fix CFLAGS and ptest issues 2015-11-09 1:16 [PATCH 0/1 v2] mdadm: fix CFLAGS and ptest issues wenzong.fan 2015-11-09 1:26 ` [PATCH 1/1 " wenzong.fan @ 2015-11-09 1:30 ` wenzong fan 2015-11-09 1:33 ` wenzong fan 2 siblings, 0 replies; 4+ messages in thread From: wenzong fan @ 2015-11-09 1:30 UTC (permalink / raw) To: openembedded-core The patch for this thread fails to send, anyways I need to re-send them again. Please ignore this cover. Wenzong On 11/09/2015 09:16 AM, wenzong.fan@windriver.com wrote: > From: Wenzong Fan <wenzong.fan@windriver.com> > > V2 change: > > * also fix another ptest error while building poky-lsb: > > raid6check.c:352:2: error: ignoring return value of posix_memalign, \ > declared with attribute warn_unused_result [-Werror=unused-result] > > The following changes since commit fc45deac89ef63ca1c44e763c38ced7dfd72cbe1: > > build-appliance-image: Update to jethro head revision (2015-11-03 14:03:03 +0000) > > are available in the git repository at: > > git://git.pokylinux.org/poky-contrib wenzong/mdadm > http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/mdadm > > Wenzong Fan (1): > mdadm: fix CFLAGS and ptest issues > > .../mdadm/files/mdadm-fix-ptest-build-errors.patch | 50 ++++++++++++++++++++++ > meta/recipes-extended/mdadm/mdadm_3.3.4.bb | 3 +- > 2 files changed, 52 insertions(+), 1 deletion(-) > create mode 100644 meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 0/1 v2] mdadm: fix CFLAGS and ptest issues 2015-11-09 1:16 [PATCH 0/1 v2] mdadm: fix CFLAGS and ptest issues wenzong.fan 2015-11-09 1:26 ` [PATCH 1/1 " wenzong.fan 2015-11-09 1:30 ` [PATCH 0/1 " wenzong fan @ 2015-11-09 1:33 ` wenzong fan 2 siblings, 0 replies; 4+ messages in thread From: wenzong fan @ 2015-11-09 1:33 UTC (permalink / raw) To: openembedded-core Patch included. Wenzong On 11/09/2015 09:26 AM, wenzong.fan@windriver.com wrote: > From: Wenzong Fan <wenzong.fan@windriver.com> > > V2 change: > > * also fix another ptest error while building poky-lsb: > > raid6check.c:352:2: error: ignoring return value of posix_memalign, \ > declared with attribute warn_unused_result [-Werror=unused-result] > > The following changes since commit fc45deac89ef63ca1c44e763c38ced7dfd72cbe1: > > build-appliance-image: Update to jethro head revision (2015-11-03 14:03:03 +0000) > > are available in the git repository at: > > git://git.pokylinux.org/poky-contrib wenzong/mdadm > http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=wenzong/mdadm > > Wenzong Fan (1): > mdadm: fix CFLAGS and ptest issues > > .../mdadm/files/mdadm-fix-ptest-build-errors.patch | 50 ++++++++++++++++++++++ > meta/recipes-extended/mdadm/mdadm_3.3.4.bb | 3 +- > 2 files changed, 52 insertions(+), 1 deletion(-) > create mode 100644 meta/recipes-extended/mdadm/files/mdadm-fix-ptest-build-errors.patch > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-09 1:33 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-11-09 1:16 [PATCH 0/1 v2] mdadm: fix CFLAGS and ptest issues wenzong.fan 2015-11-09 1:26 ` [PATCH 1/1 " wenzong.fan 2015-11-09 1:30 ` [PATCH 0/1 " wenzong fan 2015-11-09 1:33 ` wenzong fan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox