Patchwork eglibc: fix as and ld check in libc dir

login
register
mail settings
Submitter Giuseppe CONDORELLI
Date Jan. 16, 2013, 2:14 p.m.
Message ID <1358345647-13274-1-git-send-email-giuseppe.condorelli@st.com>
Download mbox | patch
Permalink /patch/42705/
State New
Headers show

Comments

Giuseppe CONDORELLI - Jan. 16, 2013, 2:14 p.m.
Fix routine to check as and ld version check in the configure, to allow system
to correctly check for version 2.1x.

Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
---
 .../eglibc-2.16_fix_as_ld_ver_check.patch          |   23 ++++++++++++++++++++
 meta/recipes-core/eglibc/eglibc_2.16.bb            |    3 +-
 2 files changed, 25 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch
Martin Jansa - Jan. 16, 2013, 3:02 p.m.
On Wed, Jan 16, 2013 at 03:14:07PM +0100, Giuseppe CONDORELLI wrote:
> Fix routine to check as and ld version check in the configure, to allow system
> to correctly check for version 2.1x.

Does it build with gold now?
http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/020310.html

> 
> Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
> ---
>  .../eglibc-2.16_fix_as_ld_ver_check.patch          |   23 ++++++++++++++++++++
>  meta/recipes-core/eglibc/eglibc_2.16.bb            |    3 +-
>  2 files changed, 25 insertions(+), 1 deletions(-)
>  create mode 100644 meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch
> 
> diff --git a/meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch b/meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch
> new file mode 100644
> index 0000000..a8a2344
> --- /dev/null
> +++ b/meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch
> @@ -0,0 +1,23 @@
> +Fix as and ld checking steps to allow system to correctly check 2.1x versions.
> +
> +Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com> 
> +--- libc.orig/configure	2013-01-16 12:07:18.146902148 +0100
> ++++ libc/configure	2013-01-16 12:08:10.598911559 +0100
> +@@ -4757,7 +4757,7 @@ $as_echo_n "checking version of $AS... "
> +   ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
> +   case $ac_prog_version in
> +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
> +-    2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
> ++    2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
> +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
> +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
> + 
> +@@ -4820,7 +4820,7 @@ $as_echo_n "checking version of $LD... "
> +   ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
> +   case $ac_prog_version in
> +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
> +-    2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
> ++    2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
> +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
> +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
> + 
> diff --git a/meta/recipes-core/eglibc/eglibc_2.16.bb b/meta/recipes-core/eglibc/eglibc_2.16.bb
> index 2dcaceb..fbc1499 100644
> --- a/meta/recipes-core/eglibc/eglibc_2.16.bb
> +++ b/meta/recipes-core/eglibc/eglibc_2.16.bb
> @@ -33,6 +33,7 @@ SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr21
>             file://tzselect-sh.patch \
>             file://tzselect-awk.patch \
>             file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
> +	   file://eglibc-2.16_fix_as_ld_ver_check.patch \

wrong indentation

>            "
>  
>  SRC_URI[tarball.md5sum] = "88894fa6e10e58e85fbd8134b8e486a8"
> @@ -69,7 +70,7 @@ TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
>  
>  GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1"
>  
> -FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
> +#FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"

this does not belong here

Cheers,
Giuseppe Condorelli - Jan. 16, 2013, 3:07 p.m.
2013/1/16 Martin Jansa <martin.jansa@gmail.com>

> On Wed, Jan 16, 2013 at 03:14:07PM +0100, Giuseppe CONDORELLI wrote:
> > Fix routine to check as and ld version check in the configure, to allow
> system
> > to correctly check for version 2.1x.
>
> Does it build with gold now?
>
> http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/020310.html
>
> >
> > Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
> > ---
> >  .../eglibc-2.16_fix_as_ld_ver_check.patch          |   23
> ++++++++++++++++++++
> >  meta/recipes-core/eglibc/eglibc_2.16.bb            |    3 +-
> >  2 files changed, 25 insertions(+), 1 deletions(-)
> >  create mode 100644
> meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch
> >
> > diff --git
> a/meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch
> b/meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch
> > new file mode 100644
> > index 0000000..a8a2344
> > --- /dev/null
> > +++
> b/meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch
> > @@ -0,0 +1,23 @@
> > +Fix as and ld checking steps to allow system to correctly check 2.1x
> versions.
> > +
> > +Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com>
> > +--- libc.orig/configure      2013-01-16 12:07:18.146902148 +0100
> > ++++ libc/configure   2013-01-16 12:08:10.598911559 +0100
> > +@@ -4757,7 +4757,7 @@ $as_echo_n "checking version of $AS... "
> > +   ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.*
> \([0-9]*\.[0-9.]*\).*$/\1/p'`
> > +   case $ac_prog_version in
> > +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
> > +-    2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
> > ++    2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
> > +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
> > +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
> > +
> > +@@ -4820,7 +4820,7 @@ $as_echo_n "checking version of $LD... "
> > +   ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.*
> \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
> > +   case $ac_prog_version in
> > +     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
> > +-    2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
> > ++    2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
> > +        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
> > +     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
> > +
> > diff --git a/meta/recipes-core/eglibc/eglibc_2.16.bbb/meta/recipes-core/eglibc/
> eglibc_2.16.bb
> > index 2dcaceb..fbc1499 100644
> > --- a/meta/recipes-core/eglibc/eglibc_2.16.bb
> > +++ b/meta/recipes-core/eglibc/eglibc_2.16.bb
> > @@ -33,6 +33,7 @@ SRC_URI = "
> http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr21
> >             file://tzselect-sh.patch \
> >             file://tzselect-awk.patch \
> >
> file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
> > +        file://eglibc-2.16_fix_as_ld_ver_check.patch \
>
> wrong indentation
>
> >            "
> >
> >  SRC_URI[tarball.md5sum] = "88894fa6e10e58e85fbd8134b8e486a8"
> > @@ -69,7 +70,7 @@ TARGET_CPPFLAGS =
> "-I${STAGING_DIR_TARGET}${includedir}"
> >
> >  GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET
> gez_ER bn_BD te_IN es_CR.ISO-8859-1"
> >
> > -FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}',
> '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
> > +#FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}',
> '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
>
> this does not belong here
>

Sorry, my fault! I'll fix and resend!!! :)

>
> Cheers,
>
> --
> Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
Martin Jansa - Jan. 17, 2013, 12:42 p.m.
On Wed, Jan 16, 2013 at 04:07:39PM +0100, Giuseppe Condorelli wrote:
> 2013/1/16 Martin Jansa <martin.jansa@gmail.com>
> 
> > On Wed, Jan 16, 2013 at 03:14:07PM +0100, Giuseppe CONDORELLI wrote:
> > > Fix routine to check as and ld version check in the configure, to allow
> > system
> > > to correctly check for version 2.1x.
> >
> > Does it build with gold now?
> >
> > http://lists.linuxtogo.org/pipermail/openembedded-core/2012-March/020310.html

does it?
Giuseppe CONDORELLI - Jan. 17, 2013, 1:30 p.m.
Hi Martin,

Do you mean applying the patch you highlighted in libc/configure?

Cheers,
Giuseppe

>-----Original Message-----
>From: Martin Jansa [mailto:martin.jansa@gmail.com]
>Sent: giovedì 17 gennaio 2013 13:42
>To: Giuseppe Condorelli
>Cc: Giuseppe CONDORELLI; openembedded-core@lists.openembedded.org
>Subject: Re: [OE-core] [PATCH] eglibc: fix as and ld check in libc dir
>
>On Wed, Jan 16, 2013 at 04:07:39PM +0100, Giuseppe Condorelli wrote:
>> 2013/1/16 Martin Jansa <martin.jansa@gmail.com>
>>
>> > On Wed, Jan 16, 2013 at 03:14:07PM +0100, Giuseppe CONDORELLI wrote:
>> > > Fix routine to check as and ld version check in the configure, to
allow
>> > system
>> > > to correctly check for version 2.1x.
>> >
>> > Does it build with gold now?
>> >
>> > http://lists.linuxtogo.org/pipermail/openembedded-core/2012-
>March/020310.html
>
>does it?
>
>--
>Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
Martin Jansa - Jan. 17, 2013, 1:46 p.m.
On Thu, Jan 17, 2013 at 02:30:55PM +0100, Giuseppe CONDORELLI wrote:
> Hi Martin,
> 
> Do you mean applying the patch you highlighted in libc/configure?

I was expecting you're trying to fix ld --version detection when ld is
gold. But after few experiments I don't see what you're trying to fix:

martin@jama ~ $ ld.bfd --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'
2.23.1
martin@jama ~ $ ld.gold --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'
nothing -> ld.gold still unsupported

old:
martin@jama ~ $ echo 2.23.1 | egrep "2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*"
2.23.1
martin@jama ~ $ echo 2.19.1 | egrep "2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*"
2.19.1
martin@jama ~ $ echo 2.19   | egrep "2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*"
2.19
martin@jama ~ $ echo 2.1    | egrep "2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*"
2.1

new:
martin@jama ~ $ echo 2.19.1 | egrep "2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*"
2.19.1
martin@jama ~ $ echo 2.23.1 | egrep "2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*"
2.23.1
martin@jama ~ $ echo 2.19   | egrep "2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*"
2.19
martin@jama ~ $ echo 2.1    | egrep "2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*"
2.1

Can you show some example version your patch is fixing?

Cheers,

> >-----Original Message-----
> >From: Martin Jansa [mailto:martin.jansa@gmail.com]
> >Sent: giovedì 17 gennaio 2013 13:42
> >To: Giuseppe Condorelli
> >Cc: Giuseppe CONDORELLI; openembedded-core@lists.openembedded.org
> >Subject: Re: [OE-core] [PATCH] eglibc: fix as and ld check in libc dir
> >
> >On Wed, Jan 16, 2013 at 04:07:39PM +0100, Giuseppe Condorelli wrote:
> >> 2013/1/16 Martin Jansa <martin.jansa@gmail.com>
> >>
> >> > On Wed, Jan 16, 2013 at 03:14:07PM +0100, Giuseppe CONDORELLI wrote:
> >> > > Fix routine to check as and ld version check in the configure, to
> allow
> >> > system
> >> > > to correctly check for version 2.1x.
> >> >
> >> > Does it build with gold now?
> >> >
> >> > http://lists.linuxtogo.org/pipermail/openembedded-core/2012-
> >March/020310.html
> >
> >does it?
> >
> >--
> >Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
>
Giuseppe CONDORELLI - Jan. 17, 2013, 4:59 p.m.
>-----Original Message-----
>From: Martin Jansa [mailto:martin.jansa@gmail.com]
>Sent: giovedì 17 gennaio 2013 14:46
>To: Giuseppe CONDORELLI
>Cc: 'Giuseppe Condorelli'; openembedded-core@lists.openembedded.org
>Subject: Re: [OE-core] [PATCH] eglibc: fix as and ld check in libc dir
>
>On Thu, Jan 17, 2013 at 02:30:55PM +0100, Giuseppe CONDORELLI wrote:
>> Hi Martin,
>>
>> Do you mean applying the patch you highlighted in libc/configure?
>
>I was expecting you're trying to fix ld --version detection when ld is
gold. But
>after few experiments I don't see what you're trying to fix:
>
>martin@jama ~ $ ld.bfd --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-
>9]*\.[0-9.]*\).*$/\1/p'
>2.23.1
>martin@jama ~ $ ld.gold --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-
>9]*\.[0-9.]*\).*$/\1/p'
>nothing -> ld.gold still unsupported
>
>old:
>martin@jama ~ $ echo 2.23.1 | egrep
"2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-
>9][0-9]*"
>2.23.1
>martin@jama ~ $ echo 2.19.1 | egrep
"2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-
>9][0-9]*"
>2.19.1
>martin@jama ~ $ echo 2.19   | egrep
"2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-
>9][0-9]*"
>2.19
>martin@jama ~ $ echo 2.1    | egrep
"2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-
>9][0-9]*"
>2.1
>
>new:
>martin@jama ~ $ echo 2.19.1 | egrep
"2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-
>9]*"
>2.19.1
>martin@jama ~ $ echo 2.23.1 | egrep
"2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-
>9]*"
>2.23.1
>martin@jama ~ $ echo 2.19   | egrep
"2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-
>9]*"
>2.19
>martin@jama ~ $ echo 2.1    | egrep
"2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-
>9]*"
>2.1
>
>Can you show some example version your patch is fixing?
>

Hi Martin,

Please untar the attachment and run the test I sent you.
It reproduces the same scenario as in the libc/configure eglibc file.

Cheers,
Giuseppe

>Cheers,
>
>> >-----Original Message-----
>> >From: Martin Jansa [mailto:martin.jansa@gmail.com]
>> >Sent: giovedì 17 gennaio 2013 13:42
>> >To: Giuseppe Condorelli
>> >Cc: Giuseppe CONDORELLI; openembedded-
>core@lists.openembedded.org
>> >Subject: Re: [OE-core] [PATCH] eglibc: fix as and ld check in libc
>> >dir
>> >
>> >On Wed, Jan 16, 2013 at 04:07:39PM +0100, Giuseppe Condorelli wrote:
>> >> 2013/1/16 Martin Jansa <martin.jansa@gmail.com>
>> >>
>> >> > On Wed, Jan 16, 2013 at 03:14:07PM +0100, Giuseppe CONDORELLI
>wrote:
>> >> > > Fix routine to check as and ld version check in the configure,
>> >> > > to
>> allow
>> >> > system
>> >> > > to correctly check for version 2.1x.
>> >> >
>> >> > Does it build with gold now?
>> >> >
>> >> > http://lists.linuxtogo.org/pipermail/openembedded-core/2012-
>> >March/020310.html
>> >
>> >does it?
>> >
>> >--
>> >Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
>>
>
>--
>Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
Martin Jansa - Jan. 17, 2013, 5:28 p.m.
On Thu, Jan 17, 2013 at 05:59:00PM +0100, Giuseppe CONDORELLI wrote:
> 
> >-----Original Message-----
> >From: Martin Jansa [mailto:martin.jansa@gmail.com]
> >Sent: giovedì 17 gennaio 2013 14:46
> >To: Giuseppe CONDORELLI
> >Cc: 'Giuseppe Condorelli'; openembedded-core@lists.openembedded.org
> >Subject: Re: [OE-core] [PATCH] eglibc: fix as and ld check in libc dir
> >
> >On Thu, Jan 17, 2013 at 02:30:55PM +0100, Giuseppe CONDORELLI wrote:
> >> Hi Martin,
> >>
> >> Do you mean applying the patch you highlighted in libc/configure?
> 
> Hi Martin,
> 
> Please untar the attachment and run the test I sent you.
> It reproduces the same scenario as in the libc/configure eglibc file.

Ah I see it's not used as regexp.

But doesn't upstream have some good reason to require 2.20 and newer?

It was incremented from 1.17+ to 2.20+ in
http://www.eglibc.org/cgi-bin/viewvc.cgi/trunk/libc/configure.in?r1=17195&r2=17385

Cheers,

> >> >-----Original Message-----
> >> >From: Martin Jansa [mailto:martin.jansa@gmail.com]
> >> >Sent: giovedì 17 gennaio 2013 13:42
> >> >To: Giuseppe Condorelli
> >> >Cc: Giuseppe CONDORELLI; openembedded-
> >core@lists.openembedded.org
> >> >Subject: Re: [OE-core] [PATCH] eglibc: fix as and ld check in libc
> >> >dir
> >> >
> >> >On Wed, Jan 16, 2013 at 04:07:39PM +0100, Giuseppe Condorelli wrote:
> >> >> 2013/1/16 Martin Jansa <martin.jansa@gmail.com>
> >> >>
> >> >> > On Wed, Jan 16, 2013 at 03:14:07PM +0100, Giuseppe CONDORELLI
> >wrote:
> >> >> > > Fix routine to check as and ld version check in the configure,
> >> >> > > to
> >> allow
> >> >> > system
> >> >> > > to correctly check for version 2.1x.
> >> >> >
> >> >> > Does it build with gold now?
> >> >> >
> >> >> > http://lists.linuxtogo.org/pipermail/openembedded-core/2012-
> >> >March/020310.html
> >> >
> >> >does it?
> >> >
> >> >--
> >> >Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
> >>
> >
> >--
> >Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
Giuseppe CONDORELLI - Jan. 18, 2013, 8:32 a.m.
Yes Martin,

but I discovered the issue building (erroneously because eglibc was actually
not required at all) an external-toolchain a little bit old (gcc and
binutils) against the master oe-core repository,
which contains eglic-2.16 as you know. And libc/configure comes with the
issue I highlighted.
So, please, think to my patch as a nice to have and not as a mandatory one.
I don't know if other people will fall in my same condition.

Thanks so much for your support.
Giuseppe


>-----Original Message-----
>From: Martin Jansa [mailto:martin.jansa@gmail.com]
>Sent: giovedì 17 gennaio 2013 18:28
>To: Giuseppe CONDORELLI
>Cc: 'Giuseppe Condorelli'; openembedded-core@lists.openembedded.org
>Subject: Re: [OE-core] [PATCH] eglibc: fix as and ld check in libc dir
>
>On Thu, Jan 17, 2013 at 05:59:00PM +0100, Giuseppe CONDORELLI wrote:
>>
>> >-----Original Message-----
>> >From: Martin Jansa [mailto:martin.jansa@gmail.com]
>> >Sent: giovedì 17 gennaio 2013 14:46
>> >To: Giuseppe CONDORELLI
>> >Cc: 'Giuseppe Condorelli'; openembedded-core@lists.openembedded.org
>> >Subject: Re: [OE-core] [PATCH] eglibc: fix as and ld check in libc
>> >dir
>> >
>> >On Thu, Jan 17, 2013 at 02:30:55PM +0100, Giuseppe CONDORELLI wrote:
>> >> Hi Martin,
>> >>
>> >> Do you mean applying the patch you highlighted in libc/configure?
>>
>> Hi Martin,
>>
>> Please untar the attachment and run the test I sent you.
>> It reproduces the same scenario as in the libc/configure eglibc file.
>
>Ah I see it's not used as regexp.
>
>But doesn't upstream have some good reason to require 2.20 and newer?
>
>It was incremented from 1.17+ to 2.20+ in
>http://www.eglibc.org/cgi-
>bin/viewvc.cgi/trunk/libc/configure.in?r1=17195&r2=17385
>
>Cheers,
>
>> >> >-----Original Message-----
>> >> >From: Martin Jansa [mailto:martin.jansa@gmail.com]
>> >> >Sent: giovedì 17 gennaio 2013 13:42
>> >> >To: Giuseppe Condorelli
>> >> >Cc: Giuseppe CONDORELLI; openembedded-
>> >core@lists.openembedded.org
>> >> >Subject: Re: [OE-core] [PATCH] eglibc: fix as and ld check in libc
>> >> >dir
>> >> >
>> >> >On Wed, Jan 16, 2013 at 04:07:39PM +0100, Giuseppe Condorelli wrote:
>> >> >> 2013/1/16 Martin Jansa <martin.jansa@gmail.com>
>> >> >>
>> >> >> > On Wed, Jan 16, 2013 at 03:14:07PM +0100, Giuseppe CONDORELLI
>> >wrote:
>> >> >> > > Fix routine to check as and ld version check in the
>> >> >> > > configure, to
>> >> allow
>> >> >> > system
>> >> >> > > to correctly check for version 2.1x.
>> >> >> >
>> >> >> > Does it build with gold now?
>> >> >> >
>> >> >> > http://lists.linuxtogo.org/pipermail/openembedded-core/2012-
>> >> >March/020310.html
>> >> >
>> >> >does it?
>> >> >
>> >> >--
>> >> >Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
>> >>
>> >
>> >--
>> >Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
>
>
>
>--
>Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com
Martin Jansa - Jan. 18, 2013, 8:55 a.m.
On Fri, Jan 18, 2013 at 9:32 AM, Giuseppe CONDORELLI <
giuseppe.condorelli@st.com> wrote:

> Yes Martin,
>
> but I discovered the issue building (erroneously because eglibc was
> actually
> not required at all) an external-toolchain a little bit old (gcc and
> binutils) against the master oe-core repository,
> which contains eglic-2.16 as you know. And libc/configure comes with the
> issue I highlighted.
> So, please, think to my patch as a nice to have and not as a mandatory one.
> I don't know if other people will fall in my same condition.
>
> Thanks so much for your support.
> Giuseppe
>

And are you using eglibc-2.16 built with binutils-2.19 in runtime on some
targets?

My point is that if upstream developers decided to support binutils-2.20+
only, they probably had some reason to do it and failing configure check is
better way to show you're building unsupported combination then something
failing badly in runtime on target.

http://sourceware.org/git/?p=glibc.git;a=commit;f=configure.in;h=bec039bcefe6a0494a249e2b78e112a0ab60893b
This commit also doesn't say why..

Cheers,
Giuseppe CONDORELLI - Jan. 18, 2013, 9:01 a.m.
From: Martin Jansa [mailto:martin.jansa@gmail.com] 
Sent: venerdì 18 gennaio 2013 09:55
To: Giuseppe CONDORELLI
Cc: Giuseppe Condorelli; Patches and discussions about the oe-core layer
Subject: Re: [OE-core] [PATCH] eglibc: fix as and ld check in libc dir

 

 

On Fri, Jan 18, 2013 at 9:32 AM, Giuseppe CONDORELLI <giuseppe.condorelli@st.com> wrote:

Yes Martin,

but I discovered the issue building (erroneously because eglibc was actually
not required at all) an external-toolchain a little bit old (gcc and
binutils) against the master oe-core repository,
which contains eglic-2.16 as you know. And libc/configure comes with the
issue I highlighted.
So, please, think to my patch as a nice to have and not as a mandatory one.
I don't know if other people will fall in my same condition.

Thanks so much for your support.
Giuseppe


And are you using eglibc-2.16 built with binutils-2.19 in runtime on some targets?

 

In fact I wrote it was my fault, indeed eglibc has not to be built at all given my external toolchain fully provides all the infrastructure.

However this mistake highlighted the possible issue

 

My point is that if upstream developers decided to support binutils-2.20+ only, they probably had some reason to do it and failing configure check is better way to show you're building unsupported combination then something failing badly in runtime on target.

 

http://sourceware.org/git/?p=glibc.git;a=commit;f=configure.in;h=bec039bcefe6a0494a249e2b78e112a0ab60893b

This commit also doesn't say why..

 

Ok, no problem. The patch can remain unapplied if you think it could be useless. At any rate it will remain as document if other people will fall in that for any reason.

 

Cheers,

Cheers,
Khem Raj - Jan. 18, 2013, 5:12 p.m.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 01/16/2013 06:14 AM, Giuseppe CONDORELLI wrote:
> Fix routine to check as and ld version check in the configure, to
> allow system to correctly check for version 2.1x.

Giuseppe

This demotion of letting older binutils will not be accepted since
there is reason to demand 2.20 minimum see

http://sourceware.org/ml/libc-alpha/2012-02/msg00605.html

Now you might have backported needed functionality into your local
copy of binutils but having this patch local to your layer is best
approach here.

- -Khem




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlD5gmAACgkQuwUzVZGdMxQrBQCggIutiKGvZYlfQimMO+2gEu6S
ZcUAnjQynyJrIQTfIJWw/Jqt7ZyzJ0Xl
=7E9N
-----END PGP SIGNATURE-----

Patch

diff --git a/meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch b/meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch
new file mode 100644
index 0000000..a8a2344
--- /dev/null
+++ b/meta/recipes-core/eglibc/eglibc-2.16/eglibc-2.16_fix_as_ld_ver_check.patch
@@ -0,0 +1,23 @@ 
+Fix as and ld checking steps to allow system to correctly check 2.1x versions.
+
+Signed-off-by: Giuseppe Condorelli <giuseppe.condorelli@st.com> 
+--- libc.orig/configure	2013-01-16 12:07:18.146902148 +0100
++++ libc/configure	2013-01-16 12:08:10.598911559 +0100
+@@ -4757,7 +4757,7 @@ $as_echo_n "checking version of $AS... "
+   ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+   case $ac_prog_version in
+     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+-    2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
++    2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
+        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ 
+@@ -4820,7 +4820,7 @@ $as_echo_n "checking version of $LD... "
+   ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'`
+   case $ac_prog_version in
+     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+-    2.1[0-9][0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
++    2.1[0-9]*|2.[2-9][0-9]*|[3-9].*|[1-9][0-9]*)
+        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ 
diff --git a/meta/recipes-core/eglibc/eglibc_2.16.bb b/meta/recipes-core/eglibc/eglibc_2.16.bb
index 2dcaceb..fbc1499 100644
--- a/meta/recipes-core/eglibc/eglibc_2.16.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.16.bb
@@ -33,6 +33,7 @@  SRC_URI = "http://downloads.yoctoproject.org/releases/eglibc/eglibc-${PV}-svnr21
            file://tzselect-sh.patch \
            file://tzselect-awk.patch \
            file://0001-eglibc-run-libm-err-tab.pl-with-specific-dirs-in-S.patch \
+	   file://eglibc-2.16_fix_as_ld_ver_check.patch \
           "
 
 SRC_URI[tarball.md5sum] = "88894fa6e10e58e85fbd8134b8e486a8"
@@ -69,7 +70,7 @@  TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir}"
 
 GLIBC_BROKEN_LOCALES = " _ER _ET so_ET yn_ER sid_ET tr_TR mn_MN gez_ET gez_ER bn_BD te_IN es_CR.ISO-8859-1"
 
-FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
+#FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
 
 #
 # For now, we will skip building of a gcc package if it is a uclibc one