* [PATCH-for-5.0 v2] roms/edk2-funcs: Force softfloat ARM toolchain prefix on Debian
@ 2019-12-05 19:00 Philippe Mathieu-Daudé
2019-12-06 0:19 ` Laszlo Ersek
0 siblings, 1 reply; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-05 19:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Laszlo Ersek, Philippe Mathieu-Daudé, Ard Biesheuvel
The Debian (based) distributions currently provides 2 ARM
toolchains, documented as [1]:
* The ARM EABI (armel) port targets a range of older 32-bit ARM
devices, particularly those used in NAS hardware and a variety
of *plug computers.
* The newer ARM hard-float (armhf) port supports newer, more
powerful 32-bit devices using version 7 of the ARM architecture
specification.
For various reasons documented in [2], the EDK2 project recommend
to use the softfloat toolchain (named 'armel' by Debian).
Force the softfloat cross toolchain prefix on Debian distributions.
[1] https://www.debian.org/ports/arm/#status
[2] https://github.com/tianocore/edk2/commit/41203b9a
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
roms/edk2-funcs.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/roms/edk2-funcs.sh b/roms/edk2-funcs.sh
index 3f4485b201..abd6bbe1fd 100644
--- a/roms/edk2-funcs.sh
+++ b/roms/edk2-funcs.sh
@@ -112,6 +112,9 @@ qemu_edk2_get_cross_prefix()
( [ "$gcc_arch" == i686 ] && [ "$host_arch" == x86_64 ] ); then
# no cross-compiler needed
:
+ elif ( [ -e /etc/debian_version ] && [ "$gcc_arch" == arm ] ); then
+ # force hard-float cross-compiler on Debian
+ printf 'arm-linux-gnueabi-'
else
printf '%s-linux-gnu-\n' "$gcc_arch"
fi
--
2.21.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH-for-5.0 v2] roms/edk2-funcs: Force softfloat ARM toolchain prefix on Debian
2019-12-05 19:00 [PATCH-for-5.0 v2] roms/edk2-funcs: Force softfloat ARM toolchain prefix on Debian Philippe Mathieu-Daudé
@ 2019-12-06 0:19 ` Laszlo Ersek
2019-12-06 5:21 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 3+ messages in thread
From: Laszlo Ersek @ 2019-12-06 0:19 UTC (permalink / raw)
To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Ard Biesheuvel
On 12/05/19 20:00, Philippe Mathieu-Daudé wrote:
> The Debian (based) distributions currently provides 2 ARM
> toolchains, documented as [1]:
>
> * The ARM EABI (armel) port targets a range of older 32-bit ARM
> devices, particularly those used in NAS hardware and a variety
> of *plug computers.
> * The newer ARM hard-float (armhf) port supports newer, more
> powerful 32-bit devices using version 7 of the ARM architecture
> specification.
>
> For various reasons documented in [2], the EDK2 project recommend
> to use the softfloat toolchain (named 'armel' by Debian).
>
> Force the softfloat cross toolchain prefix on Debian distributions.
>
> [1] https://www.debian.org/ports/arm/#status
> [2] https://github.com/tianocore/edk2/commit/41203b9a
Ah cool, this answers my earlier question -- "the GCCx toolchain targets
can use either when building for ARM".
Still not sure if this is a "recommendation" for using soft-float, but
if it works, I'm OK with it.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> roms/edk2-funcs.sh | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/roms/edk2-funcs.sh b/roms/edk2-funcs.sh
> index 3f4485b201..abd6bbe1fd 100644
> --- a/roms/edk2-funcs.sh
> +++ b/roms/edk2-funcs.sh
> @@ -112,6 +112,9 @@ qemu_edk2_get_cross_prefix()
> ( [ "$gcc_arch" == i686 ] && [ "$host_arch" == x86_64 ] ); then
> # no cross-compiler needed
> :
> + elif ( [ -e /etc/debian_version ] && [ "$gcc_arch" == arm ] ); then
> + # force hard-float cross-compiler on Debian
The comment has not been updated; it still says hard-float.
With the comment updated:
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Thanks,
Laszlo
> + printf 'arm-linux-gnueabi-'
> else
> printf '%s-linux-gnu-\n' "$gcc_arch"
> fi
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH-for-5.0 v2] roms/edk2-funcs: Force softfloat ARM toolchain prefix on Debian
2019-12-06 0:19 ` Laszlo Ersek
@ 2019-12-06 5:21 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-12-06 5:21 UTC (permalink / raw)
To: Laszlo Ersek, qemu-devel; +Cc: Ard Biesheuvel
On 12/6/19 1:19 AM, Laszlo Ersek wrote:
> On 12/05/19 20:00, Philippe Mathieu-Daudé wrote:
>> The Debian (based) distributions currently provides 2 ARM
>> toolchains, documented as [1]:
>>
>> * The ARM EABI (armel) port targets a range of older 32-bit ARM
>> devices, particularly those used in NAS hardware and a variety
>> of *plug computers.
>> * The newer ARM hard-float (armhf) port supports newer, more
>> powerful 32-bit devices using version 7 of the ARM architecture
>> specification.
>>
>> For various reasons documented in [2], the EDK2 project recommend
>> to use the softfloat toolchain (named 'armel' by Debian).
>>
>> Force the softfloat cross toolchain prefix on Debian distributions.
>>
>> [1] https://www.debian.org/ports/arm/#status
>> [2] https://github.com/tianocore/edk2/commit/41203b9a
>
> Ah cool, this answers my earlier question -- "the GCCx toolchain targets
> can use either when building for ARM".
>
> Still not sure if this is a "recommendation" for using soft-float, but
> if it works, I'm OK with it.
I'll use "suggests" instead.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> roms/edk2-funcs.sh | 3 +++
>> 1 file changed, 3 insertions(+)
>>
>> diff --git a/roms/edk2-funcs.sh b/roms/edk2-funcs.sh
>> index 3f4485b201..abd6bbe1fd 100644
>> --- a/roms/edk2-funcs.sh
>> +++ b/roms/edk2-funcs.sh
>> @@ -112,6 +112,9 @@ qemu_edk2_get_cross_prefix()
>> ( [ "$gcc_arch" == i686 ] && [ "$host_arch" == x86_64 ] ); then
>> # no cross-compiler needed
>> :
>> + elif ( [ -e /etc/debian_version ] && [ "$gcc_arch" == arm ] ); then
>> + # force hard-float cross-compiler on Debian
>
> The comment has not been updated; it still says hard-float.
Oops.
> With the comment updated:
>
> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Thanks!
>
> Thanks,
> Laszlo
>
>> + printf 'arm-linux-gnueabi-'
>> else
>> printf '%s-linux-gnu-\n' "$gcc_arch"
>> fi
>>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-12-06 5:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-12-05 19:00 [PATCH-for-5.0 v2] roms/edk2-funcs: Force softfloat ARM toolchain prefix on Debian Philippe Mathieu-Daudé
2019-12-06 0:19 ` Laszlo Ersek
2019-12-06 5:21 ` Philippe Mathieu-Daudé
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).