Patchwork poky-tiny: Enable x86-64 to build eglibc correctly

login
register
mail settings
Submitter Saul Wold
Date Aug. 30, 2012, 7:48 p.m.
Message ID <1346356090-13811-1-git-send-email-sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/35569/
State New
Headers show

Comments

Saul Wold - Aug. 30, 2012, 7:48 p.m.
The libc-libm-big option allows eglibc to correctly configure
itself to include the correct math functions for 64bit operations

[YOCTO #2943]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta-yocto/conf/distro/poky-tiny.conf |    1 +
 1 file changed, 1 insertion(+)
Chris Larson - Aug. 30, 2012, 8:04 p.m.
On Thu, Aug 30, 2012 at 12:48 PM, Saul Wold <sgw@linux.intel.com> wrote:
> The libc-libm-big option allows eglibc to correctly configure
> itself to include the correct math functions for 64bit operations
>
> [YOCTO #2943]
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>

I'm curious, is this needed for other 64 bit platforms, e.g. powerpc64?
Phil Blundell - Aug. 30, 2012, 8:13 p.m.
On Thu, 2012-08-30 at 13:04 -0700, Chris Larson wrote:
> On Thu, Aug 30, 2012 at 12:48 PM, Saul Wold <sgw@linux.intel.com> wrote:
> > The libc-libm-big option allows eglibc to correctly configure
> > itself to include the correct math functions for 64bit operations
> >
> > [YOCTO #2943]
> >
> > Signed-off-by: Saul Wold <sgw@linux.intel.com>
> 
> I'm curious, is this needed for other 64 bit platforms, e.g. powerpc64?

Also out of curiosity, what's the use-case for 64-bit userspace in a
"tiny" context?  I would have thought that you'd generally want x32.

p.
Khem Raj - Aug. 30, 2012, 9:40 p.m.
On Thu, Aug 30, 2012 at 1:13 PM, Phil Blundell <philb@gnu.org> wrote:
> On Thu, 2012-08-30 at 13:04 -0700, Chris Larson wrote:
>> On Thu, Aug 30, 2012 at 12:48 PM, Saul Wold <sgw@linux.intel.com> wrote:
>> > The libc-libm-big option allows eglibc to correctly configure
>> > itself to include the correct math functions for 64bit operations
>> >
>> > [YOCTO #2943]
>> >
>> > Signed-off-by: Saul Wold <sgw@linux.intel.com>
>>
>> I'm curious, is this needed for other 64 bit platforms, e.g. powerpc64?
>
> Also out of curiosity, what's the use-case for 64-bit userspace in a
> "tiny" context?  I would have thought that you'd generally want x32.
>

I guess its for sake of completeness.

> p.
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Khem Raj - Aug. 30, 2012, 9:49 p.m.
On Thu, Aug 30, 2012 at 12:48 PM, Saul Wold <sgw@linux.intel.com> wrote:
> The libc-libm-big option allows eglibc to correctly configure
> itself to include the correct math functions for 64bit operations
>
> [YOCTO #2943]
>
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>  meta-yocto/conf/distro/poky-tiny.conf |    1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta-yocto/conf/distro/poky-tiny.conf b/meta-yocto/conf/distro/poky-tiny.conf
> index 8ae1d85..bfb4432 100644
> --- a/meta-yocto/conf/distro/poky-tiny.conf
> +++ b/meta-yocto/conf/distro/poky-tiny.conf
> @@ -63,6 +63,7 @@ ASSUME_PROVIDED += "pkgconfig$"
>  # Reconfigure eglibc for a smaller installation
>  # Comment out any of the lines below to disable them in the build
>  DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
> +DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
>
>  # Required for "who"
>  DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-getlogin"


there is a bug in eglibc if it cant build without libc-libm-big
it should have not caused any undefined symbol failures because
all it should have done is not use double precision so your computations
will be less accurate.

> --
> 1.7.9.5
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Saul Wold - Aug. 31, 2012, 4:31 p.m.
On 08/30/2012 02:49 PM, Khem Raj wrote:
> On Thu, Aug 30, 2012 at 12:48 PM, Saul Wold <sgw@linux.intel.com> wrote:
>> The libc-libm-big option allows eglibc to correctly configure
>> itself to include the correct math functions for 64bit operations
>>
>> [YOCTO #2943]
>>
>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>> ---
>>   meta-yocto/conf/distro/poky-tiny.conf |    1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/meta-yocto/conf/distro/poky-tiny.conf b/meta-yocto/conf/distro/poky-tiny.conf
>> index 8ae1d85..bfb4432 100644
>> --- a/meta-yocto/conf/distro/poky-tiny.conf
>> +++ b/meta-yocto/conf/distro/poky-tiny.conf
>> @@ -63,6 +63,7 @@ ASSUME_PROVIDED += "pkgconfig$"
>>   # Reconfigure eglibc for a smaller installation
>>   # Comment out any of the lines below to disable them in the build
>>   DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
>> +DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
>>
>>   # Required for "who"
>>   DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-getlogin"
>
>
> there is a bug in eglibc if it cant build without libc-libm-big
> it should have not caused any undefined symbol failures because
> all it should have done is not use double precision so your computations
> will be less accurate.
>

Khem,

You are correct the problem is that if the libm-big option is not 
specificed it grabs the dbl-wrap files for some sysdep function, but 
still uses the dbl-64 functions for others.

Should I file an eglibc bug?

Sau!

>> --
>> 1.7.9.5
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
>
Khem Raj - Aug. 31, 2012, 4:47 p.m.
On Fri, Aug 31, 2012 at 9:31 AM, Saul Wold <sgw@linux.intel.com> wrote:
>
> Should I file an eglibc bug?

yes
Darren Hart - Sept. 6, 2012, 5:47 p.m.
On 08/30/2012 02:49 PM, Khem Raj wrote:
> On Thu, Aug 30, 2012 at 12:48 PM, Saul Wold <sgw@linux.intel.com> wrote:
>> The libc-libm-big option allows eglibc to correctly configure
>> itself to include the correct math functions for 64bit operations
>>
>> [YOCTO #2943]
>>
>> Signed-off-by: Saul Wold <sgw@linux.intel.com>
>> ---
>>  meta-yocto/conf/distro/poky-tiny.conf |    1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/meta-yocto/conf/distro/poky-tiny.conf b/meta-yocto/conf/distro/poky-tiny.conf
>> index 8ae1d85..bfb4432 100644
>> --- a/meta-yocto/conf/distro/poky-tiny.conf
>> +++ b/meta-yocto/conf/distro/poky-tiny.conf
>> @@ -63,6 +63,7 @@ ASSUME_PROVIDED += "pkgconfig$"
>>  # Reconfigure eglibc for a smaller installation
>>  # Comment out any of the lines below to disable them in the build
>>  DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
>> +DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
>>
>>  # Required for "who"
>>  DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-getlogin"
> 
> 
> there is a bug in eglibc if it cant build without libc-libm-big
> it should have not caused any undefined symbol failures because
> all it should have done is not use double precision so your computations
> will be less accurate.

Agreed.

~200K is significant when we are talking about < 4MB images. However, so
long as we track the eglibc bug, I am fine with including this
workaround to get things going.

I would ask that a comment be added which calls this out as a workaround
for the eglibc bug (a bug number would be great).

Thanks,

Darren

> 
>> --
>> 1.7.9.5
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Patch

diff --git a/meta-yocto/conf/distro/poky-tiny.conf b/meta-yocto/conf/distro/poky-tiny.conf
index 8ae1d85..bfb4432 100644
--- a/meta-yocto/conf/distro/poky-tiny.conf
+++ b/meta-yocto/conf/distro/poky-tiny.conf
@@ -63,6 +63,7 @@  ASSUME_PROVIDED += "pkgconfig$"
 # Reconfigure eglibc for a smaller installation
 # Comment out any of the lines below to disable them in the build
 DISTRO_FEATURES_LIBC_TINY = "libc-libm libc-crypt"
+DISTRO_FEATURES_LIBC_TINY_append_x86-64 = " libc-libm-big"
 
 # Required for "who"
 DISTRO_FEATURES_LIBC_MINIMAL = "libc-utmp libc-getlogin"