libgcc/config/t-hardfp uses sed to convert libgcc function names
(like __addsf3) into a tuple of -D defines.

The regular expression used for that contains |, which is not a basic
regular expression and not understood by posix sed.

Gnu sed seems to enable it by default, I suppose - or this should have been
noticed earlier. Many other sed implementations need -E or -r (for gnu sed
compatibility), which the attached patch adds.

It might be better to split the alternatives into several expressions
and duplicate the right hand sides, or mix with some sh code, but this is
already pretty messy.

Martin
--- t-hardfp.orig       2014-02-07 08:46:34.000000000 +0100
+++ t-hardfp    2014-03-23 11:36:12.000000000 +0100
@@ -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

Reply via email to