Patchwork [02/11] mdadm: fix CC definition in the Makefile

login
register
mail settings
Submitter Nitin A Kamble
Date Dec. 2, 2011, 8:20 p.m.
Message ID <b224881df056580c35e265c2b3db311a1f366409.1322856805.git.nitin.a.kamble@intel.com>
Download mbox | patch
Permalink /patch/16131/
State New
Headers show

Comments

Nitin A Kamble - Dec. 2, 2011, 8:20 p.m.
From: Nitin A Kamble <nitin.a.kamble@intel.com>

By hardcoding CC's definition in the Makefile, all the gcc parameters
set by tune settings are lost. Causing compile failure with x32 toolchain

As the bitbake defined CC is good, there is no need to redfine CC in the
make file, hence removed it to fix the issue.

This fixes bug: [YOCTO #1414]

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 .../mdadm/files/mdadm_fix_for_x32.patch            |   24 ++++++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_3.2.2.bb         |    3 +-
 2 files changed, 26 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch
Paul Menzel - Dec. 3, 2011, 6:08 p.m.
Dear Nitin,


thank you for your patch.

Am Freitag, den 02.12.2011, 12:20 -0800 schrieb nitin.a.kamble@intel.com:
> From: Nitin A Kamble <nitin.a.kamble@intel.com>
> 
> By hardcoding CC's definition in the Makefile, all the gcc parameters
> set by tune settings are lost. Causing compile failure with x32 toolchain
> 
> As the bitbake defined CC is good, there is no need to redfine CC in the

red*e*fine

> make file, hence removed it to fix the issue.
> 
> This fixes bug: [YOCTO #1414]
> 
> Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
> ---
>  .../mdadm/files/mdadm_fix_for_x32.patch            |   24 ++++++++++++++++++++
>  meta/recipes-extended/mdadm/mdadm_3.2.2.bb         |    3 +-
>  2 files changed, 26 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch
> 
> diff --git a/meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch b/meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch
> new file mode 100644
> index 0000000..898e70b
> --- /dev/null
> +++ b/meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch
> @@ -0,0 +1,24 @@
> +UpstreamStatus: pending
> +
> +By hardcoding CC's definition in the Makefile, all the gcc parameters 
> +set by tune settings are lost. Causing compile failure with x32 toolchain
> +
> +As the bitbake defined CC is good, there is no need to redfine CC in the 
> +make file, hence removed it to fix the issue.
> +
> +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
> +2011/12/01
> +
> +Index: mdadm-3.2.2/Makefile
> +===================================================================
> +--- mdadm-3.2.2.orig/Makefile
> ++++ mdadm-3.2.2/Makefile
> +@@ -40,7 +40,7 @@ KLIBC=/home/src/klibc/klibc-0.77
> + 
> + KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32
> + 
> +-CC = $(CROSS_COMPILE)gcc
> ++#CC = $(CROSS_COMPILE)gcc

I would prefer to fix this the way it can be applied upstream. I could
even ask them to apply it.

> + CXFLAGS = -ggdb
> + CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
> + ifdef WARN_UNUSED

[…]


Thanks,

Paul
Nitin A Kamble - Dec. 5, 2011, 4:58 p.m.
Paul,
  Thanks for your feedback. I will try to incorporate your feedback in the commit.

Thanks,
Nitin

> -----Original Message-----

> From: openembedded-core-bounces@lists.openembedded.org

> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of

> Paul Menzel

> Sent: Saturday, December 03, 2011 10:08 AM

> To: openembedded-core@lists.openembedded.org

> Subject: Re: [OE-core] [PATCH 02/11] mdadm: fix CC definition in the

> Makefile

> 

> Dear Nitin,

> 

> 

> thank you for your patch.

> 

> Am Freitag, den 02.12.2011, 12:20 -0800 schrieb

> nitin.a.kamble@intel.com:

> > From: Nitin A Kamble <nitin.a.kamble@intel.com>

> >

> > By hardcoding CC's definition in the Makefile, all the gcc parameters

> > set by tune settings are lost. Causing compile failure with x32

> > toolchain

> >

> > As the bitbake defined CC is good, there is no need to redfine CC in

> > the

> 

> red*e*fine

> 

> > make file, hence removed it to fix the issue.

> >

> > This fixes bug: [YOCTO #1414]

> >

> > Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>

> > ---

> >  .../mdadm/files/mdadm_fix_for_x32.patch            |   24

> ++++++++++++++++++++

> >  meta/recipes-extended/mdadm/mdadm_3.2.2.bb         |    3 +-

> >  2 files changed, 26 insertions(+), 1 deletions(-)  create mode

> 100644

> > meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch

> >

> > diff --git a/meta/recipes-

> extended/mdadm/files/mdadm_fix_for_x32.patch

> > b/meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch

> > new file mode 100644

> > index 0000000..898e70b

> > --- /dev/null

> > +++ b/meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch

> > @@ -0,0 +1,24 @@

> > +UpstreamStatus: pending

> > +

> > +By hardcoding CC's definition in the Makefile, all the gcc

> parameters

> > +set by tune settings are lost. Causing compile failure with x32

> > +toolchain

> > +

> > +As the bitbake defined CC is good, there is no need to redfine CC in

> > +the make file, hence removed it to fix the issue.

> > +

> > +Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>

> > +2011/12/01

> > +

> > +Index: mdadm-3.2.2/Makefile

> > +===================================================================

> > +--- mdadm-3.2.2.orig/Makefile

> > ++++ mdadm-3.2.2/Makefile

> > +@@ -40,7 +40,7 @@ KLIBC=/home/src/klibc/klibc-0.77

> > +

> > + KLIBC_GCC = gcc -nostdinc -iwithprefix include

> > + -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include

> > + -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32

> > +

> > +-CC = $(CROSS_COMPILE)gcc

> > ++#CC = $(CROSS_COMPILE)gcc

> 

> I would prefer to fix this the way it can be applied upstream. I could

> even ask them to apply it.

> 

> > + CXFLAGS = -ggdb

> > + CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra

> > + -Wno-unused-parameter ifdef WARN_UNUSED

> 

> […]

> 

> 

> Thanks,

> 

> Paul

Patch

diff --git a/meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch b/meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch
new file mode 100644
index 0000000..898e70b
--- /dev/null
+++ b/meta/recipes-extended/mdadm/files/mdadm_fix_for_x32.patch
@@ -0,0 +1,24 @@ 
+UpstreamStatus: pending
+
+By hardcoding CC's definition in the Makefile, all the gcc parameters 
+set by tune settings are lost. Causing compile failure with x32 toolchain
+
+As the bitbake defined CC is good, there is no need to redfine CC in the 
+make file, hence removed it to fix the issue.
+
+Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
+2011/12/01
+
+Index: mdadm-3.2.2/Makefile
+===================================================================
+--- mdadm-3.2.2.orig/Makefile
++++ mdadm-3.2.2/Makefile
+@@ -40,7 +40,7 @@ KLIBC=/home/src/klibc/klibc-0.77
+ 
+ KLIBC_GCC = gcc -nostdinc -iwithprefix include -I$(KLIBC)/klibc/include -I$(KLIBC)/linux/include -I$(KLIBC)/klibc/arch/i386/include -I$(KLIBC)/klibc/include/bits32
+ 
+-CC = $(CROSS_COMPILE)gcc
++#CC = $(CROSS_COMPILE)gcc
+ CXFLAGS = -ggdb
+ CWFLAGS = -Wall -Werror -Wstrict-prototypes -Wextra -Wno-unused-parameter
+ ifdef WARN_UNUSED
diff --git a/meta/recipes-extended/mdadm/mdadm_3.2.2.bb b/meta/recipes-extended/mdadm/mdadm_3.2.2.bb
index 97878ed..7e380ec 100644
--- a/meta/recipes-extended/mdadm/mdadm_3.2.2.bb
+++ b/meta/recipes-extended/mdadm/mdadm_3.2.2.bb
@@ -8,10 +8,11 @@  LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
                     file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
                     file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
 
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.bz2 \
 	    file://0001-mdadm-fix-build-failures-ppc64.patch \
+	    file://mdadm_fix_for_x32.patch \
 	  "
 
 SRC_URI[md5sum] = "12ee2fbf3beddb60601fb7a4c4905651"