summaryrefslogtreecommitdiff
path: root/cross/gcc-mips-current/patches/patch-libgcc_config_t-hardfp
blob: 21ac27dbac1e14b30b405deaae9e98d19c8aaaf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
$NetBSD: patch-libgcc_config_t-hardfp,v 1.1 2014/03/31 09:49:32 martin Exp $

Make sed invocation slightly more portable

--- libgcc/config/t-hardfp.orig	2014-02-07 08:46:34.000000000 +0100
+++ libgcc/config/t-hardfp	2014-03-23 13:25:44.000000000 +0100
@@ -51,11 +51,11 @@
 		    	      $(subst M,$(pair),truncM2))
 
 # Regexp for matching a floating-point mode.
-hardfp_mode_regexp := $(shell echo $(hardfp_float_modes) | sed 's/ /\\|/g')
+hardfp_mode_regexp := $(shell echo $(hardfp_float_modes) | sed 's/ /|/g')
 
 # Regexp for matching the end of a function name, after the last
 # floating-point mode.
-hardfp_suffix_regexp := $(shell echo $(hardfp_int_modes) 2 3 | sed 's/ /\\|/g')
+hardfp_suffix_regexp := $(shell echo $(hardfp_int_modes) 2 3 | sed 's/ /|/g')
 
 # Add -D options to define:
 #   FUNC: the function name (e.g. __addsf3)
@@ -64,7 +64,7 @@
 #   TYPE: the last floating-point mode (e.g. sf)
 hardfp_defines_for = \
   $(shell echo $1 | \
-    sed 's/\(.*\)\($(hardfp_mode_regexp)\)\($(hardfp_suffix_regexp)\|\)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/')
+    sed -r 's/(.*)($(hardfp_mode_regexp))($(hardfp_suffix_regexp)|.*)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/')
 
 hardfp-o = $(patsubst %,%$(objext),$(hardfp_func_list))
 $(hardfp-o): %$(objext): $(srcdir)/config/hardfp.c