Skip to content

Commit 2c10772

Browse files
dcpleunggalak
authored andcommitted
x86_64: 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 <[email protected]>
1 parent b3bb217 commit 2c10772

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
From df5ca42adff42aff861d4af132c87a3b6aaaf21c Mon Sep 17 00:00:00 2001
2+
From: Daniel Leung <[email protected]>
3+
Date: Thu, 10 Dec 2020 10:31:19 -0800
4+
Subject: [PATCH 17/17] x86_64-zephyr-elf: fix soft float for x86 32-bit
5+
6+
This fixes soft-float build for x86 32-bit (-m32 -msoft-float)
7+
under x86_64-zephyr-elf multilib build. This now actually
8+
includes the soft float functions.
9+
10+
Signed-off-by: Daniel Leung <[email protected]>
11+
---
12+
libgcc/config.host | 9 ++++++++-
13+
libgcc/config/i386/64/t-softfp | 2 ++
14+
2 files changed, 10 insertions(+), 1 deletion(-)
15+
create mode 100644 libgcc/config/i386/64/t-softfp
16+
17+
diff --git a/libgcc/config.host b/libgcc/config.host
18+
index 54ae74350..f76f23943 100644
19+
--- a/libgcc/config.host
20+
+++ b/libgcc/config.host
21+
@@ -704,7 +704,7 @@ i[34567]86-*-elf*)
22+
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
23+
;;
24+
x86_64-zephyr-elf)
25+
- tmake_file="$tmake_file i386/t-crtstuff i386/64/t-zephyr64 t-dfprules"
26+
+ tmake_file="$tmake_file i386/t-crtstuff i386/64/t-zephyr64"
27+
;;
28+
x86_64-*-elf* | x86_64-*-rtems*)
29+
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
30+
@@ -1528,6 +1528,13 @@ i[34567]86-*-linux* | x86_64-*-linux* | \
31+
esac
32+
33+
case ${host} in
34+
+x86_64-zephyr-elf)
35+
+ tmake_file="${tmake_file} t-softfp-sfdf"
36+
+ if test "${host_address}" = 32; then
37+
+ tmake_file="${tmake_file} i386/${host_address}/t-softfp"
38+
+ fi
39+
+ tmake_file="${tmake_file} i386/64/t-softfp i386/t-softfp t-softfp t-dfprules"
40+
+ ;;
41+
i[34567]86-*-elfiamcu | i[34567]86-zephyr-elf | i[34567]86-*-rtems*)
42+
# These use soft-fp for SFmode and DFmode, not just TFmode.
43+
;;
44+
diff --git a/libgcc/config/i386/64/t-softfp b/libgcc/config/i386/64/t-softfp
45+
new file mode 100644
46+
index 000000000..f35d6161b
47+
--- /dev/null
48+
+++ b/libgcc/config/i386/64/t-softfp
49+
@@ -0,0 +1,2 @@
50+
+softfp_wrap_start := '\#ifndef __x86_64__'
51+
+softfp_wrap_end := '\#endif'
52+
--
53+
2.29.2
54+

0 commit comments

Comments
 (0)