[coreboot-gerrit] Patch set updated for coreboot: crossgcc: Add workaround for libgcc's GNU sed dependency

Martin Roth (martinroth@google.com) gerrit at coreboot.org
Fri Apr 8 17:10:42 CEST 2016


Martin Roth (martinroth at google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14275

-gerrit

commit 5e554ed3ba55e6a995206754a558b9665772cb3a
Author: Stefan Reinauer <stefan.reinauer at coreboot.org>
Date:   Wed Apr 6 13:00:16 2016 -0700

    crossgcc: Add workaround for libgcc's GNU sed dependency
    
    libgcc fails to compile on a number of platforms when a
    non-GNU sed is used.
    
    This patch has been verified by building the MIPS reference
    toolchain on OS X.
    
    Change-Id: Ia1c18ea4359de7707ac2e2640f1b8f107c47cd8c
    Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
---
 util/crossgcc/patches/gcc-5.2.0_libgcc.patch | 57 ++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/util/crossgcc/patches/gcc-5.2.0_libgcc.patch b/util/crossgcc/patches/gcc-5.2.0_libgcc.patch
new file mode 100644
index 0000000..b844802
--- /dev/null
+++ b/util/crossgcc/patches/gcc-5.2.0_libgcc.patch
@@ -0,0 +1,57 @@
+diff -urN gcc-5.2.0.orig/libgcc/config/t-hardfp gcc-5.2.0/libgcc/config/t-hardfp
+--- gcc-5.2.0.orig/libgcc/config/t-hardfp	2015-01-05 04:33:28.000000000 -0800
++++ gcc-5.2.0/libgcc/config/t-hardfp	2016-04-06 12:04:51.000000000 -0700
+@@ -59,21 +59,52 @@
+ 
+ hardfp_func_list := $(filter-out $(hardfp_exclusions),$(hardfp_func_list))
+ 
++HOST_OS ?= $(shell uname)
++
+ # Regexp for matching a floating-point mode.
++ifeq ($(HOST_OS), Darwin)
++hardfp_mode_regexp := $(shell echo $(hardfp_float_modes) | sed 's/ /|/g')
++else
++ifeq ($(HOST_OS), FreeBSD)
++hardfp_mode_regexp := $(shell echo $(hardfp_float_modes) | sed 's/ /|/g')
++else
+ hardfp_mode_regexp := $(shell echo $(hardfp_float_modes) | sed 's/ /\\|/g')
++endif
++endif
+ 
+ # Regexp for matching the end of a function name, after the last
+ # floating-point mode.
++ifeq ($(HOST_OS), Darwin)
++hardfp_suffix_regexp := $(shell echo $(hardfp_int_modes) 2 3 | sed 's/ /|/g')
++else
++ifeq ($(HOST_OS), FreeBSD)
++hardfp_suffix_regexp := $(shell echo $(hardfp_int_modes) 2 3 | sed 's/ /|/g')
++else
+ hardfp_suffix_regexp := $(shell echo $(hardfp_int_modes) 2 3 | sed 's/ /\\|/g')
++endif
++endif
+ 
+ # Add -D options to define:
+ #   FUNC: the function name (e.g. __addsf3)
+ #   OP:   the function name without the leading __ and with the last
+ #            floating-point mode removed (e.g. add3)
+ #   TYPE: the last floating-point mode (e.g. sf)
++
++ifeq ($(HOST_OS), Darwin)
+ hardfp_defines_for = \
+   $(shell echo $1 | \
+-    sed 's/\(.*\)\($(hardfp_mode_regexp)\)\($(hardfp_suffix_regexp)\|\)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/')
++    sed -E 's/(.*)($(hardfp_mode_regexp))($(hardfp_suffix_regexp)|.*)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/')
++else
++ifeq ($(HOST_OS), FreeBSD)
++hardfp_defines_for = \
++  $(shell echo $1 | \
++    sed -r 's/(.*)($(hardfp_mode_regexp))($(hardfp_suffix_regexp)|.*)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/')
++else
++hardfp_defines_for = \
++  $(shell echo $1 | \
++    sed 's/\(.*\)\($(hardfp_mode_regexp)\)\($(hardfp_suffix_regexp)\|\)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/')
++endif
++endif
+ 
+ hardfp-o = $(patsubst %,%$(objext),$(hardfp_func_list))
+ $(hardfp-o): %$(objext): $(srcdir)/config/hardfp.c



More information about the coreboot-gerrit mailing list