All of lore.kernel.org
 help / color / mirror / Atom feed
* [RMC][PATCH v2] RMC: Support x32 build
@ 2017-07-05 19:39 swee.aun.khor
  2017-07-06 20:08 ` Todor Minchev
  0 siblings, 1 reply; 7+ messages in thread
From: swee.aun.khor @ 2017-07-05 19:39 UTC (permalink / raw)
  To: yocto; +Cc: swee.aun.khor, todor.minchev, saul.wold

From: sweeaun <swee.aun.khor@intel.com>

RMC efi is needed to compiled as 64 bits even DEFAULTTUNE is x32.

Signed-off-by: sweeaun <swee.aun.khor@intel.com>
---
 Makefile.efi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Makefile.efi b/Makefile.efi
index 4f69dfe..95e0f8c 100644
--- a/Makefile.efi
+++ b/Makefile.efi
@@ -16,6 +16,9 @@ RMC_INSTALL_LIB_PATH := $(RMC_INSTALL_PREFIX)/lib/
 
 RMC_CFLAGS := -DRMC_EFI -Wall -I$(TOPDIR)/inc -fpic -nostdinc -nostdlib  -fno-builtin -std=gnu90
 
+#RMC efi is needed to be compiled as 64 bit even DEFAULTTUNE is x32 
+CC := $(patsubst -mx32, -m64, $(CC))
+
 all: librmcefi
 
 $(RMC_LIB_OBJ): %.efi.o: %.c
-- 
2.7.4



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

* Re: [RMC][PATCH v2] RMC: Support x32 build
  2017-07-05 19:39 [RMC][PATCH v2] RMC: Support x32 build swee.aun.khor
@ 2017-07-06 20:08 ` Todor Minchev
  2017-07-06 20:37   ` Khem Raj
  2017-07-07  1:39   ` Khor, Swee Aun
  0 siblings, 2 replies; 7+ messages in thread
From: Todor Minchev @ 2017-07-06 20:08 UTC (permalink / raw)
  To: swee.aun.khor; +Cc: yocto, saul.wold

On Wed, 2017-07-05 at 12:39 -0700, swee.aun.khor@intel.com wrote:
> From: sweeaun <swee.aun.khor@intel.com>
> 
> RMC efi is needed to compiled as 64 bits even DEFAULTTUNE is x32.
> 
> Signed-off-by: sweeaun <swee.aun.khor@intel.com>
> ---
>  Makefile.efi | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Makefile.efi b/Makefile.efi
> index 4f69dfe..95e0f8c 100644
> --- a/Makefile.efi
> +++ b/Makefile.efi
> @@ -16,6 +16,9 @@ RMC_INSTALL_LIB_PATH := $(RMC_INSTALL_PREFIX)/lib/
>  
>  RMC_CFLAGS := -DRMC_EFI -Wall -I$(TOPDIR)/inc -fpic -nostdinc -nostdlib  -fno-builtin -std=gnu90
>  
> +#RMC efi is needed to be compiled as 64 bit even DEFAULTTUNE is x32 
> +CC := $(patsubst -mx32, -m64, $(CC))
> +

Since this is not an RMC-specific problem, I believe that we shouldn't
patch the compiler flags in the RMC Makefile. This patch will provide
the desired outcome only when RMC is built with meta-intel. A better
alternative will be to split rmc.bb into rmc.bb (userspace app) and
rmc-efi.bb (efi library) and modify the compiler flags for each recipe.
I will send a patch that does this.

Todor

>  all: librmcefi
>  
>  $(RMC_LIB_OBJ): %.efi.o: %.c




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

* Re: [RMC][PATCH v2] RMC: Support x32 build
  2017-07-06 20:08 ` Todor Minchev
@ 2017-07-06 20:37   ` Khem Raj
  2017-07-06 20:46     ` Todor Minchev
  2017-07-07  1:39   ` Khor, Swee Aun
  1 sibling, 1 reply; 7+ messages in thread
From: Khem Raj @ 2017-07-06 20:37 UTC (permalink / raw)
  To: Todor Minchev; +Cc: swee.aun.khor, yocto@yoctoproject.org, Saul Wold

On Thu, Jul 6, 2017 at 1:08 PM, Todor Minchev
<todor.minchev@linux.intel.com> wrote:
> On Wed, 2017-07-05 at 12:39 -0700, swee.aun.khor@intel.com wrote:
>> From: sweeaun <swee.aun.khor@intel.com>
>>
>> RMC efi is needed to compiled as 64 bits even DEFAULTTUNE is x32.
>>
>> Signed-off-by: sweeaun <swee.aun.khor@intel.com>
>> ---
>>  Makefile.efi | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/Makefile.efi b/Makefile.efi
>> index 4f69dfe..95e0f8c 100644
>> --- a/Makefile.efi
>> +++ b/Makefile.efi
>> @@ -16,6 +16,9 @@ RMC_INSTALL_LIB_PATH := $(RMC_INSTALL_PREFIX)/lib/
>>
>>  RMC_CFLAGS := -DRMC_EFI -Wall -I$(TOPDIR)/inc -fpic -nostdinc -nostdlib  -fno-builtin -std=gnu90
>>
>> +#RMC efi is needed to be compiled as 64 bit even DEFAULTTUNE is x32
>> +CC := $(patsubst -mx32, -m64, $(CC))
>> +
>

does this mean package is overriding CC passed from env ?
if yes then I think app should be fixed to respect CC if set in env
and only set it if CC env is not set

> Since this is not an RMC-specific problem, I believe that we shouldn't
> patch the compiler flags in the RMC Makefile. This patch will provide
> the desired outcome only when RMC is built with meta-intel. A better
> alternative will be to split rmc.bb into rmc.bb (userspace app) and
> rmc-efi.bb (efi library) and modify the compiler flags for each recipe.
> I will send a patch that does this.
>
> Todor
>
>>  all: librmcefi
>>
>>  $(RMC_LIB_OBJ): %.efi.o: %.c
>
>
> --
> _______________________________________________
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


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

* Re: [RMC][PATCH v2] RMC: Support x32 build
  2017-07-06 20:37   ` Khem Raj
@ 2017-07-06 20:46     ` Todor Minchev
  2017-07-06 22:46       ` Minchev, Todor
  0 siblings, 1 reply; 7+ messages in thread
From: Todor Minchev @ 2017-07-06 20:46 UTC (permalink / raw)
  To: Khem Raj; +Cc: swee.aun.khor, yocto@yoctoproject.org, Saul Wold

On Thu, 2017-07-06 at 13:37 -0700, Khem Raj wrote:
> On Thu, Jul 6, 2017 at 1:08 PM, Todor Minchev
> <todor.minchev@linux.intel.com> wrote:
> > On Wed, 2017-07-05 at 12:39 -0700, swee.aun.khor@intel.com wrote:
> >> From: sweeaun <swee.aun.khor@intel.com>
> >>
> >> RMC efi is needed to compiled as 64 bits even DEFAULTTUNE is x32.
> >>
> >> Signed-off-by: sweeaun <swee.aun.khor@intel.com>
> >> ---
> >>  Makefile.efi | 3 +++
> >>  1 file changed, 3 insertions(+)
> >>
> >> diff --git a/Makefile.efi b/Makefile.efi
> >> index 4f69dfe..95e0f8c 100644
> >> --- a/Makefile.efi
> >> +++ b/Makefile.efi
> >> @@ -16,6 +16,9 @@ RMC_INSTALL_LIB_PATH := $(RMC_INSTALL_PREFIX)/lib/
> >>
> >>  RMC_CFLAGS := -DRMC_EFI -Wall -I$(TOPDIR)/inc -fpic -nostdinc -nostdlib  -fno-builtin -std=gnu90
> >>
> >> +#RMC efi is needed to be compiled as 64 bit even DEFAULTTUNE is x32
> >> +CC := $(patsubst -mx32, -m64, $(CC))
> >> +
> >
> 
> does this mean package is overriding CC passed from env ?
> if yes then I think app should be fixed to respect CC if set in env
> and only set it if CC env is not set

+1

The app respects both CC and CFLAGS from the env. They have to be set to
the correct values before the Makefile is called.
  
> 
> > Since this is not an RMC-specific problem, I believe that we shouldn't
> > patch the compiler flags in the RMC Makefile. This patch will provide
> > the desired outcome only when RMC is built with meta-intel. A better
> > alternative will be to split rmc.bb into rmc.bb (userspace app) and
> > rmc-efi.bb (efi library) and modify the compiler flags for each recipe.
> > I will send a patch that does this.
> >
> > Todor
> >
> >>  all: librmcefi
> >>
> >>  $(RMC_LIB_OBJ): %.efi.o: %.c
> >
> >
> > --
> > _______________________________________________
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto




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

* Re: [RMC][PATCH v2] RMC: Support x32 build
  2017-07-06 20:46     ` Todor Minchev
@ 2017-07-06 22:46       ` Minchev, Todor
  2017-07-06 23:08         ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Minchev, Todor @ 2017-07-06 22:46 UTC (permalink / raw)
  To: Khor, Swee Aun; +Cc: yocto@yoctoproject.org, Wold, Saul

On Thu, 2017-07-06 at 13:46 -0700, Todor Minchev wrote:
> On Thu, 2017-07-06 at 13:37 -0700, Khem Raj wrote:
> > On Thu, Jul 6, 2017 at 1:08 PM, Todor Minchev
> > <todor.minchev@linux.intel.com> wrote:
> > > On Wed, 2017-07-05 at 12:39 -0700, swee.aun.khor@intel.com wrote:
> > >> From: sweeaun <swee.aun.khor@intel.com>
> > >>
> > >> RMC efi is needed to compiled as 64 bits even DEFAULTTUNE is x32.
> > >>
> > >> Signed-off-by: sweeaun <swee.aun.khor@intel.com>
> > >> ---
> > >>  Makefile.efi | 3 +++
> > >>  1 file changed, 3 insertions(+)
> > >>
> > >> diff --git a/Makefile.efi b/Makefile.efi
> > >> index 4f69dfe..95e0f8c 100644
> > >> --- a/Makefile.efi
> > >> +++ b/Makefile.efi
> > >> @@ -16,6 +16,9 @@ RMC_INSTALL_LIB_PATH := $(RMC_INSTALL_PREFIX)/lib/
> > >>
> > >>  RMC_CFLAGS := -DRMC_EFI -Wall -I$(TOPDIR)/inc -fpic -nostdinc -nostdlib  -fno-builtin -std=gnu90
> > >>
> > >> +#RMC efi is needed to be compiled as 64 bit even DEFAULTTUNE is x32
> > >> +CC := $(patsubst -mx32, -m64, $(CC))
> > >> +
> > >
> > 
> > does this mean package is overriding CC passed from env ?
> > if yes then I think app should be fixed to respect CC if set in env
> > and only set it if CC env is not set
> 
> +1
> 
> The app respects both CC and CFLAGS from the env. They have to be set to
> the correct values before the Makefile is called.
>   
> > 
> > > Since this is not an RMC-specific problem, I believe that we shouldn't
> > > patch the compiler flags in the RMC Makefile. This patch will provide
> > > the desired outcome only when RMC is built with meta-intel. A better
> > > alternative will be to split rmc.bb into rmc.bb (userspace app) and
> > > rmc-efi.bb (efi library) and modify the compiler flags for each recipe.
> > > I will send a patch that does this.

This patch should fix the x32 builds.

https://lists.yoctoproject.org/pipermail/meta-intel/2017-July/004818.html

--Todor

> > >
> > >>  all: librmcefi
> > >>
> > >>  $(RMC_LIB_OBJ): %.efi.o: %.c
> > >
> > >
> > > --
> > > _______________________________________________
> > > yocto mailing list
> > > yocto@yoctoproject.org
> > > https://lists.yoctoproject.org/listinfo/yocto
> 
> 


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

* Re: [RMC][PATCH v2] RMC: Support x32 build
  2017-07-06 22:46       ` Minchev, Todor
@ 2017-07-06 23:08         ` Khem Raj
  0 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2017-07-06 23:08 UTC (permalink / raw)
  To: Minchev, Todor; +Cc: Khor, Swee Aun, yocto@yoctoproject.org, Wold, Saul

On Thu, Jul 6, 2017 at 3:46 PM, Minchev, Todor <todor.minchev@intel.com> wrote:
> On Thu, 2017-07-06 at 13:46 -0700, Todor Minchev wrote:
>> On Thu, 2017-07-06 at 13:37 -0700, Khem Raj wrote:
>> > On Thu, Jul 6, 2017 at 1:08 PM, Todor Minchev
>> > <todor.minchev@linux.intel.com> wrote:
>> > > On Wed, 2017-07-05 at 12:39 -0700, swee.aun.khor@intel.com wrote:
>> > >> From: sweeaun <swee.aun.khor@intel.com>
>> > >>
>> > >> RMC efi is needed to compiled as 64 bits even DEFAULTTUNE is x32.
>> > >>
>> > >> Signed-off-by: sweeaun <swee.aun.khor@intel.com>
>> > >> ---
>> > >>  Makefile.efi | 3 +++
>> > >>  1 file changed, 3 insertions(+)
>> > >>
>> > >> diff --git a/Makefile.efi b/Makefile.efi
>> > >> index 4f69dfe..95e0f8c 100644
>> > >> --- a/Makefile.efi
>> > >> +++ b/Makefile.efi
>> > >> @@ -16,6 +16,9 @@ RMC_INSTALL_LIB_PATH := $(RMC_INSTALL_PREFIX)/lib/
>> > >>
>> > >>  RMC_CFLAGS := -DRMC_EFI -Wall -I$(TOPDIR)/inc -fpic -nostdinc -nostdlib  -fno-builtin -std=gnu90
>> > >>
>> > >> +#RMC efi is needed to be compiled as 64 bit even DEFAULTTUNE is x32
>> > >> +CC := $(patsubst -mx32, -m64, $(CC))
>> > >> +
>> > >
>> >
>> > does this mean package is overriding CC passed from env ?
>> > if yes then I think app should be fixed to respect CC if set in env
>> > and only set it if CC env is not set
>>
>> +1
>>
>> The app respects both CC and CFLAGS from the env. They have to be set to
>> the correct values before the Makefile is called.
>>
>> >
>> > > Since this is not an RMC-specific problem, I believe that we shouldn't
>> > > patch the compiler flags in the RMC Makefile. This patch will provide
>> > > the desired outcome only when RMC is built with meta-intel. A better
>> > > alternative will be to split rmc.bb into rmc.bb (userspace app) and
>> > > rmc-efi.bb (efi library) and modify the compiler flags for each recipe.
>> > > I will send a patch that does this.
>
> This patch should fix the x32 builds.
>
> https://lists.yoctoproject.org/pipermail/meta-intel/2017-July/004818.html
>

you could use TUNE_CCARGS_remove = "xyz" instead of anonymous python

> --Todor
>
>> > >
>> > >>  all: librmcefi
>> > >>
>> > >>  $(RMC_LIB_OBJ): %.efi.o: %.c
>> > >
>> > >
>> > > --
>> > > _______________________________________________
>> > > yocto mailing list
>> > > yocto@yoctoproject.org
>> > > https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>


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

* Re: [RMC][PATCH v2] RMC: Support x32 build
  2017-07-06 20:08 ` Todor Minchev
  2017-07-06 20:37   ` Khem Raj
@ 2017-07-07  1:39   ` Khor, Swee Aun
  1 sibling, 0 replies; 7+ messages in thread
From: Khor, Swee Aun @ 2017-07-07  1:39 UTC (permalink / raw)
  To: Todor Minchev; +Cc: yocto@yoctoproject.org, Wold, Saul

Okay. I will drop this patch. 

SweeAun

-----Original Message-----
From: Todor Minchev [mailto:todor.minchev@linux.intel.com] 
Sent: Friday, July 7, 2017 4:08 AM
To: Khor, Swee Aun <swee.aun.khor@intel.com>
Cc: yocto@yoctoproject.org; Wold, Saul <saul.wold@intel.com>
Subject: Re: [RMC][PATCH v2] RMC: Support x32 build

On Wed, 2017-07-05 at 12:39 -0700, swee.aun.khor@intel.com wrote:
> From: sweeaun <swee.aun.khor@intel.com>
> 
> RMC efi is needed to compiled as 64 bits even DEFAULTTUNE is x32.
> 
> Signed-off-by: sweeaun <swee.aun.khor@intel.com>
> ---
>  Makefile.efi | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Makefile.efi b/Makefile.efi index 4f69dfe..95e0f8c 100644
> --- a/Makefile.efi
> +++ b/Makefile.efi
> @@ -16,6 +16,9 @@ RMC_INSTALL_LIB_PATH := $(RMC_INSTALL_PREFIX)/lib/
>  
>  RMC_CFLAGS := -DRMC_EFI -Wall -I$(TOPDIR)/inc -fpic -nostdinc 
> -nostdlib  -fno-builtin -std=gnu90
>  
> +#RMC efi is needed to be compiled as 64 bit even DEFAULTTUNE is x32 
> +CC := $(patsubst -mx32, -m64, $(CC))
> +

Since this is not an RMC-specific problem, I believe that we shouldn't patch the compiler flags in the RMC Makefile. This patch will provide the desired outcome only when RMC is built with meta-intel. A better alternative will be to split rmc.bb into rmc.bb (userspace app) and rmc-efi.bb (efi library) and modify the compiler flags for each recipe.
I will send a patch that does this.

Todor

>  all: librmcefi
>  
>  $(RMC_LIB_OBJ): %.efi.o: %.c



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

end of thread, other threads:[~2017-07-07  1:39 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-05 19:39 [RMC][PATCH v2] RMC: Support x32 build swee.aun.khor
2017-07-06 20:08 ` Todor Minchev
2017-07-06 20:37   ` Khem Raj
2017-07-06 20:46     ` Todor Minchev
2017-07-06 22:46       ` Minchev, Todor
2017-07-06 23:08         ` Khem Raj
2017-07-07  1:39   ` Khor, Swee Aun

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.