Code Monkey home page Code Monkey logo

Comments (2)

galak avatar galak commented on May 28, 2024

Here's my hack patch from meta-zephyr-sdk.

The bit that doesn't work properly when building is the change to libgcc/config.host. I think the version is this patch isn't identical to what is in meta-zephyr-sdk as I was attempting to try some different things.

From 77fda8795eab3344c50da56910bae8ac94f11d64 Mon Sep 17 00:00:00 2001
From: Kumar Gala <[email protected]>
Date: Mon, 11 Feb 2019 15:52:37 -0600
Subject: [PATCH 1/2] port over x86 multilib/soft-fp support

Signed-off-by: Kumar Gala <[email protected]>
---
 gcc/config.gcc                 |  4 ++++
 gcc/config/i386/t-zephyr       | 23 +++++++++++++++++++++++
 libgcc/config.host             |  3 +++
 libgcc/config/i386/32/t-zephyr |  1 +
 4 files changed, 31 insertions(+)
 create mode 100644 gcc/config/i386/t-zephyr
 create mode 100644 libgcc/config/i386/32/t-zephyr

diff --git a/gcc/config.gcc b/gcc/config.gcc
index cee26b531..89eec62dd 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1494,6 +1494,10 @@ x86_64-*-darwin*)
 i[34567]86-*-elfiamcu)
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/iamcu.h"
 	;;
+i586-zephyr-elf)
+	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
+	tmake_file="${tmake_file} i386/t-zephyr"
+	;;
 i[34567]86-*-elf*)
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h newlib-stdint.h i386/i386elf.h"
 	;;
diff --git a/gcc/config/i386/t-zephyr b/gcc/config/i386/t-zephyr
new file mode 100644
index 000000000..52312345b
--- /dev/null
+++ b/gcc/config/i386/t-zephyr
@@ -0,0 +1,23 @@
+# Copyright (C) 2016 Intel Corporation.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
+#
+
+MULTILIB_OPTIONS += msoft-float
+MULTILIB_DIRNAMES += soft-float
+MULTILIB_MATCHES = msoft-float=mno-80387
+MULTILIB_EXCEPTIONS = 
diff --git a/libgcc/config.host b/libgcc/config.host
index 12b5fd076..6b9000868 100644
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -606,6 +606,9 @@ x86_64-*-darwin*)
 i[34567]86-*-elfiamcu)
 	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"
 	;;
+i586-zephyr-elf)
+	tmake_file="$tmake_file i386/t-crtstuff t-softfp-sfdftf i386/32/t-softfp i386/32/t-zephyr i386/t-softfp t-softfp t-dfprules"
+	;;
 i[34567]86-*-elf*)
 	tmake_file="$tmake_file i386/t-crtstuff t-crtstuff-pic t-libgcc-pic"
 	;;
diff --git a/libgcc/config/i386/32/t-zephyr b/libgcc/config/i386/32/t-zephyr
new file mode 100644
index 000000000..7595cdeed
--- /dev/null
+++ b/libgcc/config/i386/32/t-zephyr
@@ -0,0 +1 @@
+HOST_LIBGCC2_CFLAGS += -mlong-double-80
-- 
2.20.1

from sdk-ng.

galak avatar galak commented on May 28, 2024

You also need to enable multilib in i586.config for soft-fp builds.

from sdk-ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.