Patchwork [3/3] gcc-configure-sdk: Point sysroot to correct location

login
register
mail settings
Submitter Khem Raj
Date Oct. 21, 2011, 5:02 a.m.
Message ID <1319173361-11527-3-git-send-email-raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/13673/
State Superseded
Headers show

Comments

Khem Raj - Oct. 21, 2011, 5:02 a.m.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-devtools/gcc/gcc-configure-sdk.inc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
James Limbouris - Oct. 21, 2011, 5:12 a.m.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Khem Raj
> Sent: Friday, 21 October 2011 1:03 PM
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to correct
> location
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  meta/recipes-devtools/gcc/gcc-configure-sdk.inc |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc b/meta/recipes-
> devtools/gcc/gcc-configure-sdk.inc
> index de80870..98fd4c1 100644
> --- a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
> +++ b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
> @@ -7,7 +7,7 @@ USE_NLS = '${@base_conditional( "TARGET_OS", "linux-
> uclibceabi", "no", "", d )}'
>  EXTRA_OECONF_PATHS = "--with-local-
> prefix=${SDKPATH}/sysroots/${TARGET_SYS}${target_exec_prefix} \
>                        --with-gxx-include-dir=${target_includedir}/c++ \
>                        --with-build-time-
> tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
> -                      --with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
> +                      --with-
> sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-
> ${TARGET_OS} \
>                        --with-build-sysroot=${STAGING_DIR_TARGET}"
> 
>  #
> --
> 1.7.5.4
> 

Shouldn't --with-local-prefix be changed too? I am testing with both ${TARGET_SYS}'s replaced. Will post results shortly.

James
Khem Raj - Oct. 21, 2011, 5:16 a.m.
On Thu, Oct 20, 2011 at 10:12 PM, James Limbouris
<james@digitalmatter.com.au> wrote:
>> -----Original Message-----
>> From: openembedded-core-bounces@lists.openembedded.org
>> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
>> Khem Raj
>> Sent: Friday, 21 October 2011 1:03 PM
>> To: openembedded-core@lists.openembedded.org
>> Subject: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to correct
>> location
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> ---
>>  meta/recipes-devtools/gcc/gcc-configure-sdk.inc |    2 +-
>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc b/meta/recipes-
>> devtools/gcc/gcc-configure-sdk.inc
>> index de80870..98fd4c1 100644
>> --- a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
>> @@ -7,7 +7,7 @@ USE_NLS = '${@base_conditional( "TARGET_OS", "linux-
>> uclibceabi", "no", "", d )}'
>>  EXTRA_OECONF_PATHS = "--with-local-
>> prefix=${SDKPATH}/sysroots/${TARGET_SYS}${target_exec_prefix} \
>>                        --with-gxx-include-dir=${target_includedir}/c++ \
>>                        --with-build-time-
>> tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
>> -                      --with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
>> +                      --with-
>> sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-
>> ${TARGET_OS} \
>>                        --with-build-sysroot=${STAGING_DIR_TARGET}"
>>
>>  #
>> --
>> 1.7.5.4
>>
>
> Shouldn't --with-local-prefix be changed too? I am testing with both ${TARGET_SYS}'s replaced. Will post results shortly.

yes I think both places it should change

>
> James
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
James Limbouris - Oct. 21, 2011, 5:23 a.m.
> -----Original Message-----

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

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

> Khem Raj

> Sent: Friday, 21 October 2011 1:16 PM

> To: Patches and discussions about the oe-core layer

> Subject: Re: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to correct

> location

> 

> On Thu, Oct 20, 2011 at 10:12 PM, James Limbouris

> <james@digitalmatter.com.au> wrote:

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

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

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

> Of

> >> Khem Raj

> >> Sent: Friday, 21 October 2011 1:03 PM

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

> >> Subject: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to correct

> >> location

> >>

> >> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> >> ---

> >>  meta/recipes-devtools/gcc/gcc-configure-sdk.inc |    2 +-

> >>  1 files changed, 1 insertions(+), 1 deletions(-)

> >>

> >> diff --git a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc b/meta/recipes-

> >> devtools/gcc/gcc-configure-sdk.inc

> >> index de80870..98fd4c1 100644

> >> --- a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc

> >> +++ b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc

> >> @@ -7,7 +7,7 @@ USE_NLS = '${@base_conditional( "TARGET_OS", "linux-

> >> uclibceabi", "no", "", d )}'

> >>  EXTRA_OECONF_PATHS = "--with-local-

> >> prefix=${SDKPATH}/sysroots/${TARGET_SYS}${target_exec_prefix} \

> >>                        --with-gxx-include-dir=${target_includedir}/c++ \

> >>                        --with-build-time-

> >> tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \

> >> -                      --with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \

> >> +                      --with-

> >> sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-

> >> ${TARGET_OS} \

> >>                        --with-build-sysroot=${STAGING_DIR_TARGET}"

> >>

> >>  #

> >> --

> >> 1.7.5.4

> >>

> >

> > Shouldn't --with-local-prefix be changed too? I am testing with both

> ${TARGET_SYS}'s replaced. Will post results shortly.

> 

> yes I think both places it should change

> 


Ok, I've tested with both changed, and the corresponding binutils patch, and both Qt and kernel compiles are working.

Thanks,
James
Richard Purdie - Oct. 26, 2011, 8:54 p.m.
On Fri, 2011-10-21 at 05:23 +0000, James Limbouris wrote:
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org
> > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> > Khem Raj
> > Sent: Friday, 21 October 2011 1:16 PM
> > To: Patches and discussions about the oe-core layer
> > Subject: Re: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to correct
> > location
> > 
> > On Thu, Oct 20, 2011 at 10:12 PM, James Limbouris
> > <james@digitalmatter.com.au> wrote:
> > >> -----Original Message-----
> > >> From: openembedded-core-bounces@lists.openembedded.org
> > >> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> > Of
> > >> Khem Raj
> > >> Sent: Friday, 21 October 2011 1:03 PM
> > >> To: openembedded-core@lists.openembedded.org
> > >> Subject: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to correct
> > >> location
> > >>
> > >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > >> ---
> > >>  meta/recipes-devtools/gcc/gcc-configure-sdk.inc |    2 +-
> > >>  1 files changed, 1 insertions(+), 1 deletions(-)
> > >>
> > >> diff --git a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc b/meta/recipes-
> > >> devtools/gcc/gcc-configure-sdk.inc
> > >> index de80870..98fd4c1 100644
> > >> --- a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
> > >> +++ b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
> > >> @@ -7,7 +7,7 @@ USE_NLS = '${@base_conditional( "TARGET_OS", "linux-
> > >> uclibceabi", "no", "", d )}'
> > >>  EXTRA_OECONF_PATHS = "--with-local-
> > >> prefix=${SDKPATH}/sysroots/${TARGET_SYS}${target_exec_prefix} \
> > >>                        --with-gxx-include-dir=${target_includedir}/c++ \
> > >>                        --with-build-time-
> > >> tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
> > >> -                      --with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
> > >> +                      --with-
> > >> sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-
> > >> ${TARGET_OS} \
> > >>                        --with-build-sysroot=${STAGING_DIR_TARGET}"
> > >>
> > >>  #
> > >> --
> > >> 1.7.5.4
> > >>
> > >
> > > Shouldn't --with-local-prefix be changed too? I am testing with both
> > ${TARGET_SYS}'s replaced. Will post results shortly.
> > 
> > yes I think both places it should change
> > 
> 
> Ok, I've tested with both changed, and the corresponding binutils patch, and both Qt and kernel compiles are working.

I took these patches but I would like to stress that we shouldn't need
to rely on the hardcoded path in the compiler, it should be picking up
any alternative sysroot paths from the environment. If this isn't
happening, we should be figuring out why not. This change therefore
hides issues and does not fix the problem entirely :(.

Cheers,

Richard
James Limbouris - Oct. 27, 2011, 3:52 a.m.
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org
> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
> Richard Purdie
> Sent: Thursday, 27 October 2011 4:54 AM
> To: Patches and discussions about the oe-core layer
> Subject: Re: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to correct
> location
> 
> On Fri, 2011-10-21 at 05:23 +0000, James Limbouris wrote:
> > > -----Original Message-----
> > > From: openembedded-core-bounces@lists.openembedded.org
> > > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
> Of
> > > Khem Raj
> > > Sent: Friday, 21 October 2011 1:16 PM
> > > To: Patches and discussions about the oe-core layer
> > > Subject: Re: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to
> correct
> > > location
> > >
> > > On Thu, Oct 20, 2011 at 10:12 PM, James Limbouris
> > > <james@digitalmatter.com.au> wrote:
> > > >> -----Original Message-----
> > > >> From: openembedded-core-bounces@lists.openembedded.org
> > > >> [mailto:openembedded-core-bounces@lists.openembedded.org] On
> Behalf
> > > Of
> > > >> Khem Raj
> > > >> Sent: Friday, 21 October 2011 1:03 PM
> > > >> To: openembedded-core@lists.openembedded.org
> > > >> Subject: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to
> correct
> > > >> location
> > > >>
> > > >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > > >> ---
> > > >>  meta/recipes-devtools/gcc/gcc-configure-sdk.inc |    2 +-
> > > >>  1 files changed, 1 insertions(+), 1 deletions(-)
> > > >>
> > > >> diff --git a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
> b/meta/recipes-
> > > >> devtools/gcc/gcc-configure-sdk.inc
> > > >> index de80870..98fd4c1 100644
> > > >> --- a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
> > > >> +++ b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
> > > >> @@ -7,7 +7,7 @@ USE_NLS = '${@base_conditional( "TARGET_OS",
> "linux-
> > > >> uclibceabi", "no", "", d )}'
> > > >>  EXTRA_OECONF_PATHS = "--with-local-
> > > >> prefix=${SDKPATH}/sysroots/${TARGET_SYS}${target_exec_prefix} \
> > > >>                        --with-gxx-include-dir=${target_includedir}/c++ \
> > > >>                        --with-build-time-
> > > >> tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
> > > >> -                      --with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
> > > >> +                      --with-
> > > >> sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-
> > > >> ${TARGET_OS} \
> > > >>                        --with-build-sysroot=${STAGING_DIR_TARGET}"
> > > >>
> > > >>  #
> > > >> --
> > > >> 1.7.5.4
> > > >>
> > > >
> > > > Shouldn't --with-local-prefix be changed too? I am testing with both
> > > ${TARGET_SYS}'s replaced. Will post results shortly.
> > >
> > > yes I think both places it should change
> > >
> >
> > Ok, I've tested with both changed, and the corresponding binutils patch, and
> both Qt and kernel compiles are working.
> 
> I took these patches but I would like to stress that we shouldn't need
> to rely on the hardcoded path in the compiler, it should be picking up
> any alternative sysroot paths from the environment. If this isn't
> happening, we should be figuring out why not. This change therefore
> hides issues and does not fix the problem entirely :(.
> 
> Cheers,
> 
> Richard

I'm not sure there was a problem apart from the hardcoded paths being wrong - in the use cases this fixed, the environment setup script was not being sourced.

James
Tom Rini - Oct. 27, 2011, 4:11 a.m.
On Wed, Oct 26, 2011 at 8:52 PM, James Limbouris
<james@digitalmatter.com.au> wrote:
>> -----Original Message-----
>> From: openembedded-core-bounces@lists.openembedded.org
>> [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of
>> Richard Purdie
>> Sent: Thursday, 27 October 2011 4:54 AM
>> To: Patches and discussions about the oe-core layer
>> Subject: Re: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to correct
>> location
>>
>> On Fri, 2011-10-21 at 05:23 +0000, James Limbouris wrote:
>> > > -----Original Message-----
>> > > From: openembedded-core-bounces@lists.openembedded.org
>> > > [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf
>> Of
>> > > Khem Raj
>> > > Sent: Friday, 21 October 2011 1:16 PM
>> > > To: Patches and discussions about the oe-core layer
>> > > Subject: Re: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to
>> correct
>> > > location
>> > >
>> > > On Thu, Oct 20, 2011 at 10:12 PM, James Limbouris
>> > > <james@digitalmatter.com.au> wrote:
>> > > >> -----Original Message-----
>> > > >> From: openembedded-core-bounces@lists.openembedded.org
>> > > >> [mailto:openembedded-core-bounces@lists.openembedded.org] On
>> Behalf
>> > > Of
>> > > >> Khem Raj
>> > > >> Sent: Friday, 21 October 2011 1:03 PM
>> > > >> To: openembedded-core@lists.openembedded.org
>> > > >> Subject: [OE-core] [PATCH 3/3] gcc-configure-sdk: Point sysroot to
>> correct
>> > > >> location
>> > > >>
>> > > >> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> > > >> ---
>> > > >>  meta/recipes-devtools/gcc/gcc-configure-sdk.inc |    2 +-
>> > > >>  1 files changed, 1 insertions(+), 1 deletions(-)
>> > > >>
>> > > >> diff --git a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
>> b/meta/recipes-
>> > > >> devtools/gcc/gcc-configure-sdk.inc
>> > > >> index de80870..98fd4c1 100644
>> > > >> --- a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
>> > > >> +++ b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
>> > > >> @@ -7,7 +7,7 @@ USE_NLS = '${@base_conditional( "TARGET_OS",
>> "linux-
>> > > >> uclibceabi", "no", "", d )}'
>> > > >>  EXTRA_OECONF_PATHS = "--with-local-
>> > > >> prefix=${SDKPATH}/sysroots/${TARGET_SYS}${target_exec_prefix} \
>> > > >>                        --with-gxx-include-dir=${target_includedir}/c++ \
>> > > >>                        --with-build-time-
>> > > >> tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
>> > > >> -                      --with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
>> > > >> +                      --with-
>> > > >> sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-
>> > > >> ${TARGET_OS} \
>> > > >>                        --with-build-sysroot=${STAGING_DIR_TARGET}"
>> > > >>
>> > > >>  #
>> > > >> --
>> > > >> 1.7.5.4
>> > > >>
>> > > >
>> > > > Shouldn't --with-local-prefix be changed too? I am testing with both
>> > > ${TARGET_SYS}'s replaced. Will post results shortly.
>> > >
>> > > yes I think both places it should change
>> > >
>> >
>> > Ok, I've tested with both changed, and the corresponding binutils patch, and
>> both Qt and kernel compiles are working.
>>
>> I took these patches but I would like to stress that we shouldn't need
>> to rely on the hardcoded path in the compiler, it should be picking up
>> any alternative sysroot paths from the environment. If this isn't
>> happening, we should be figuring out why not. This change therefore
>> hides issues and does not fix the problem entirely :(.
>>
>> Cheers,
>>
>> Richard
>
> I'm not sure there was a problem apart from the hardcoded paths being wrong - in the use cases this fixed, the environment setup script was not being sourced.

... except for u-boot / kernel which ignore such advice from the
environment, often with reason.

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
index de80870..98fd4c1 100644
--- a/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
+++ b/meta/recipes-devtools/gcc/gcc-configure-sdk.inc
@@ -7,7 +7,7 @@  USE_NLS = '${@base_conditional( "TARGET_OS", "linux-uclibceabi", "no", "", d )}'
 EXTRA_OECONF_PATHS = "--with-local-prefix=${SDKPATH}/sysroots/${TARGET_SYS}${target_exec_prefix} \
                       --with-gxx-include-dir=${target_includedir}/c++ \
                       --with-build-time-tools=${STAGING_DIR_NATIVE}${prefix_native}/${TARGET_SYS}/bin \
-                      --with-sysroot=${SDKPATH}/sysroots/${TARGET_SYS} \
+                      --with-sysroot=${SDKPATH}/sysroots/${TUNE_PKGARCH}${TARGET_VENDOR}-${TARGET_OS} \
                       --with-build-sysroot=${STAGING_DIR_TARGET}"
 
 #