roms/edk2-funcs: Force softfloat ARM toolchain prefix on Debian
PATCH v2 1/1 roms/edk2-funcs: Force softfloat ARM toolchain prefix on Debian
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
--- roms/edk2-funcs.sh | 3 +++ 1 file changed, 3 insertions(+)
roms/edk2-funcs.sh +3 -0
@@ -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
Signature · 1 line
2.21.0
Quoted 10 lines · Philippe Mathieu-Daudé
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.
Quoted 7 lines
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.
Quoted 11 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- roms/edk2-funcs.sh | 3 +++ 1 file changed, 3 insertions(+)roms/edk2-funcs.sh +0
-0
roms/edk2-funcs.sh qemu_edk2_get_cross_prefix() · line 116
Quoted 5 lines
roms/edk2-funcs.sh +2
-0@@ -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:
Thanks,
Laszlo
Quoted 5 lines
roms/edk2-funcs.sh +1
-0+ printf 'arm-linux-gnueabi-' else printf '%s-linux-gnu-\n' "$gcc_arch" fi
Quoted 16 lines · Laszlo Ersek
Quoted 15 lines · Philippe Mathieu-Daudé
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.
Quoted 8 lines
Quoted 2 lines
[1] https://www.debian.org/ports/arm/#status
[2] https://github.com/tianocore/edk2/commit/41203b9aAh 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.
Quoted 6 lines
Quoted 6 lines
Signed-off-by Philippe Mathieu-Daudé <[email protected]>--- roms/edk2-funcs.sh | 3 +++ 1 file changed, 3 insertions(+)
Quoted 12 lines
roms/edk2-funcs.sh qemu_edk2_get_cross_prefix() · line 116
Quoted 10 lines
roms/edk2-funcs.sh +2
-0@@ -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 DebianThe comment has not been updated; it still says hard-float.
Oops.
Quoted 3 lines
With the comment updated:
Reviewed-by Laszlo Ersek <[email protected]>
Thanks!
Quoted 10 lines
Thanks,
LaszloQuoted 5 lines
roms/edk2-funcs.sh +1
-0+ printf 'arm-linux-gnueabi-' else printf '%s-linux-gnu-\n' "$gcc_arch" fi