Skip to content

Commit 662e235

Browse files
dcpleungstephanosio
authored andcommitted
x86_64-zephyr-elf: fix soft float for x86 32-bit
This fixes soft-float build for x86 32-bit (-m32 -msoft-float) under x86_64-zephyr-elf multilib build. This now actually includes the soft float functions. Signed-off-by: Daniel Leung <daniel.leung@intel.com> Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
1 parent 3f32238 commit 662e235

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

libgcc/config.host

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ i[34567]86-*-elf*)
718718
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
719719
;;
720720
x86_64-zephyr-elf)
721-
tmake_file="$tmake_file i386/t-crtstuff i386/64/t-zephyr64 t-dfprules"
721+
tmake_file="$tmake_file i386/t-crtstuff i386/64/t-zephyr64"
722722
;;
723723
x86_64-*-elf* | x86_64-*-rtems*)
724724
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
@@ -1571,6 +1571,13 @@ i[34567]86-*-linux* | x86_64-*-linux* | \
15711571
esac
15721572

15731573
case ${host} in
1574+
x86_64-zephyr-elf)
1575+
tmake_file="${tmake_file} t-softfp-sfdf"
1576+
if test "${host_address}" = 32; then
1577+
tmake_file="${tmake_file} i386/${host_address}/t-softfp"
1578+
fi
1579+
tmake_file="${tmake_file} i386/64/t-softfp i386/t-softfp t-softfp t-dfprules"
1580+
;;
15741581
i[34567]86-*-elfiamcu | i[34567]86-zephyr-elf | i[34567]86-*-rtems*)
15751582
# These use soft-fp for SFmode and DFmode, not just TFmode.
15761583
;;

libgcc/config/i386/64/t-softfp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,2 @@
1-
softfp_extras := fixhfti fixunshfti floattihf floatuntihf
2-
3-
CFLAGS-fixhfti.c += -msse2
4-
CFLAGS-fixunshfti.c += -msse2
5-
CFLAGS-floattihf.c += -msse2
6-
CFLAGS-floatunstihf.c += -msse2
1+
softfp_wrap_start := '\#ifndef __x86_64__'
2+
softfp_wrap_end := '\#endif'

0 commit comments

Comments
 (0)