* [Buildroot] [PATCH 1/2] powerpc/spe: tweak glibc/eglibc/uclibc combinations
@ 2014-09-11 11:56 Gustavo Zacarias
2014-09-11 11:56 ` [Buildroot] [PATCH 2/2] arch/powerpc: default to soft-float for SPE ABI Gustavo Zacarias
2014-09-11 20:57 ` [Buildroot] [PATCH 1/2] powerpc/spe: tweak glibc/eglibc/uclibc combinations Thomas Petazzoni
0 siblings, 2 replies; 4+ messages in thread
From: Gustavo Zacarias @ 2014-09-11 11:56 UTC (permalink / raw)
To: buildroot
Since (e)glibc 2.19+ PowerPC SPE changed ABI conventions for sanity.
In the good old days hard-float was used, it sounds good on paper until
you account for the e500v1/v2 differences, with v1 being a fpu that does
only single-precision math.
So the ABI changed to make it soft-float and the libc (or libm) handle
that deficiency in software if required, making old precompiled binaries
incompatible (of no concern for buildroot since we've got no precompiled
binary blobs for SPE in packages).
For uClibc the support is for hard-float so disable it for soft since it
doesn't do the fallback trickery.
So do what's appropiate for each combination:
H-F S-F
eglibc 2.18 x
eglibc 2.19 x
glibc 2.19 x
glibc 2.20 x
uclibc x
Eventually hard-float should just go away, i'm keeping it for
compatibility purposes.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/glibc/Config.in | 4 ++--
toolchain/toolchain-buildroot/Config.in | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/package/glibc/Config.in b/package/glibc/Config.in
index 8c033f2..748ff44 100644
--- a/package/glibc/Config.in
+++ b/package/glibc/Config.in
@@ -11,11 +11,11 @@ choice
config BR2_EGLIBC_VERSION_2_18
bool "2.18-svnr23787"
+ depends on !BR2_POWERPC_SOFT_FLOAT
config BR2_EGLIBC_VERSION_2_19
bool "2.19-svnr25243"
- # Build breakage
- depends on !BR2_powerpc_SPE
+ depends on !BR2_powerpc_SPE || (BR2_powerpc_SPE && BR2_POWERPC_SOFT_FLOAT)
endchoice
diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in
index 53d86dd..9a711c0 100644
--- a/toolchain/toolchain-buildroot/Config.in
+++ b/toolchain/toolchain-buildroot/Config.in
@@ -33,6 +33,7 @@ config BR2_TOOLCHAIN_BUILDROOT_UCLIBC
BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || \
BR2_powerpc || BR2_sh || BR2_sparc || BR2_xtensa || \
BR2_x86_64
+ depends on !BR2_powerpc_SPE || (BR2_powerpc_SPE && !BR2_POWERPC_SOFT_FLOAT)
help
This option selects uClibc as the C library for the
cross-compilation toolchain.
@@ -67,7 +68,7 @@ config BR2_TOOLCHAIN_BUILDROOT_GLIBC
BR2_microblaze
depends on BR2_USE_MMU
depends on !BR2_PREFER_STATIC_LIB
- depends on !BR2_powerpc_SPE
+ depends on !BR2_powerpc_SPE || (BR2_powerpc_SPE && BR2_POWERPC_SOFT_FLOAT)
select BR2_TOOLCHAIN_USES_GLIBC
# our glibc.mk enables RPC support
select BR2_TOOLCHAIN_HAS_NATIVE_RPC
--
1.8.5.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] arch/powerpc: default to soft-float for SPE ABI
2014-09-11 11:56 [Buildroot] [PATCH 1/2] powerpc/spe: tweak glibc/eglibc/uclibc combinations Gustavo Zacarias
@ 2014-09-11 11:56 ` Gustavo Zacarias
2014-09-11 20:57 ` [Buildroot] [PATCH 1/2] powerpc/spe: tweak glibc/eglibc/uclibc combinations Thomas Petazzoni
1 sibling, 0 replies; 4+ messages in thread
From: Gustavo Zacarias @ 2014-09-11 11:56 UTC (permalink / raw)
To: buildroot
It really is the way forward so switch the default.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
arch/Config.in.powerpc | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/Config.in.powerpc b/arch/Config.in.powerpc
index 239f5dc..4c21739 100644
--- a/arch/Config.in.powerpc
+++ b/arch/Config.in.powerpc
@@ -141,6 +141,7 @@ endchoice
config BR2_POWERPC_SOFT_FLOAT
bool "Use soft-float"
+ default y if BR2_powerpc_SPE
select BR2_SOFT_FLOAT
help
If your target CPU does not have a Floating Point Unit (FPU)
--
1.8.5.5
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] powerpc/spe: tweak glibc/eglibc/uclibc combinations
2014-09-11 11:56 [Buildroot] [PATCH 1/2] powerpc/spe: tweak glibc/eglibc/uclibc combinations Gustavo Zacarias
2014-09-11 11:56 ` [Buildroot] [PATCH 2/2] arch/powerpc: default to soft-float for SPE ABI Gustavo Zacarias
@ 2014-09-11 20:57 ` Thomas Petazzoni
2014-09-11 21:45 ` Gustavo Zacarias
1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2014-09-11 20:57 UTC (permalink / raw)
To: buildroot
Dear Gustavo Zacarias,
On Thu, 11 Sep 2014 08:56:31 -0300, Gustavo Zacarias wrote:
> Since (e)glibc 2.19+ PowerPC SPE changed ABI conventions for sanity.
> In the good old days hard-float was used, it sounds good on paper until
> you account for the e500v1/v2 differences, with v1 being a fpu that does
> only single-precision math.
>
> So the ABI changed to make it soft-float and the libc (or libm) handle
> that deficiency in software if required, making old precompiled binaries
> incompatible (of no concern for buildroot since we've got no precompiled
> binary blobs for SPE in packages).
I'm not sure to fully understand: is PowerPC really using *soft-float*
as in all floating point operations are emulated in software? Or is it
a difference similar to the difference between hardfp and softfp on ARM
(both use the FPU and floating point instructions, it's only a
different ABI, where hardfp passes floating point arguments in floating
point registers, while softfp passes floating point arguments in
integer registers).
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] powerpc/spe: tweak glibc/eglibc/uclibc combinations
2014-09-11 20:57 ` [Buildroot] [PATCH 1/2] powerpc/spe: tweak glibc/eglibc/uclibc combinations Thomas Petazzoni
@ 2014-09-11 21:45 ` Gustavo Zacarias
0 siblings, 0 replies; 4+ messages in thread
From: Gustavo Zacarias @ 2014-09-11 21:45 UTC (permalink / raw)
To: buildroot
On 09/11/2014 05:57 PM, Thomas Petazzoni wrote:
> I'm not sure to fully understand: is PowerPC really using *soft-float*
> as in all floating point operations are emulated in software? Or is it
> a difference similar to the difference between hardfp and softfp on ARM
> (both use the FPU and floating point instructions, it's only a
> different ABI, where hardfp passes floating point arguments in floating
> point registers, while softfp passes floating point arguments in
> integer registers).
It's similar to the ARM scenario, yes.
In the SPE ABI there are no FPU registers at all, it's just an extension
of GP-ones (say 32+32 bit for DP/E500v2).
In libc-land uclibc uses the 'old' ABI (direct hard float), and so did
eglibc <= 2.18 (glibc i think never got that part officially).
To avoid re-explaining: http://www.eglibc.org/archives/patches/msg01291.html
I hope it's clear enough :)
Regards.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-11 21:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 11:56 [Buildroot] [PATCH 1/2] powerpc/spe: tweak glibc/eglibc/uclibc combinations Gustavo Zacarias
2014-09-11 11:56 ` [Buildroot] [PATCH 2/2] arch/powerpc: default to soft-float for SPE ABI Gustavo Zacarias
2014-09-11 20:57 ` [Buildroot] [PATCH 1/2] powerpc/spe: tweak glibc/eglibc/uclibc combinations Thomas Petazzoni
2014-09-11 21:45 ` Gustavo Zacarias
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.