Skip to content

Commit 41ab318

Browse files
galakstephanosio
authored andcommitted
Enable soft-fp on i586
This is a porting of the patches in meta-zephyr-sdk to gcc-8.2.0 We merge: recipes-devtools/gcc/files/libgcc-t-zephyr.patch recipes-devtools/gcc/files/config-x86-multi-gcc.patch recipes-devtools/gcc/files/x86-multilib.patch recipes-devtools/gcc/files/config-libgcc-softfp.patch Into one patch. There are some changes to libgcc/config.host in gcc-8.2.0 that required updating the patch to that file. There's some common code to handle soft-fp on x86. In gcc-8.2.0 that common code would by default get applied to a zephyr build. However the common code doesn't handle soft-fp the way we need so we add i[34567]86-zephyr-elf as a special case similar to i[34567]86-*-elfiamcu. Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
1 parent c3a198b commit 41ab318

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

gcc/config.gcc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1895,6 +1895,10 @@ x86_64-*-darwin*)
18951895
i[34567]86-*-elfiamcu)
18961896
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/iamcu.h"
18971897
;;
1898+
i586-zephyr-elf)
1899+
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
1900+
tmake_file="${tmake_file} i386/t-zephyr"
1901+
;;
18981902
i[34567]86-*-elf*)
18991903
tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
19001904
;;

gcc/config/i386/t-zephyr

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (C) 2016 Intel Corporation.
2+
#
3+
# This file is part of GCC.
4+
#
5+
# GCC is free software; you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation; either version 3, or (at your option)
8+
# any later version.
9+
#
10+
# GCC is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with GCC; see the file COPYING3. If not see
17+
# <http://www.gnu.org/licenses/>.
18+
#
19+
20+
MULTILIB_OPTIONS += msoft-float
21+
MULTILIB_DIRNAMES += soft-float
22+
MULTILIB_MATCHES = msoft-float=mno-80387
23+
MULTILIB_EXCEPTIONS =

libgcc/config.host

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,6 +711,9 @@ x86_64-*-darwin*)
711711
i[34567]86-*-elfiamcu)
712712
tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdftf i386/32/t-softfp i386/32/t-iamcu i386/t-softfp t-softfp t-dfprules"
713713
;;
714+
i586-zephyr-elf)
715+
tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdf i386/32/t-zephyr i386/t-softfp t-softfp t-dfprules"
716+
;;
714717
i[34567]86-*-elf*)
715718
tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
716719
;;
@@ -1568,7 +1571,7 @@ i[34567]86-*-linux* | x86_64-*-linux* | \
15681571
esac
15691572

15701573
case ${host} in
1571-
i[34567]86-*-elfiamcu | i[34567]86-*-rtems*)
1574+
i[34567]86-*-elfiamcu | i[34567]86-zephyr-elf | i[34567]86-*-rtems*)
15721575
# These use soft-fp for SFmode and DFmode, not just TFmode.
15731576
;;
15741577
i[34567]86-*-* | x86_64-*-*)

libgcc/config/i386/32/t-zephyr

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
HOST_LIBGCC2_CFLAGS += -mlong-double-80

0 commit comments

Comments
 (0)