See also: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66032 The problem is this sed invocation: https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=libgcc/config/t-hardfp#l76 For example, BSD sed produces (FreeBSD 12): echo "__adddsf3" | sed 's/\(.*\)\(sf\|df\)/\1 \2/' __adddsf3 GNU sed produces: echo "__adddsf3" | sed 's/\(.*\)\(sf\|df\)/\1 \2/' __addd sf3
BSD sed behaves as documented. Per re_format(7): "Obsolete (``basic'') regular expressions differ in several respects. `|' is an ordinary character and there is no equivalent for its functionality." Rewrite the RE as follows to achieve the desired outcome: echo "__adddsf3" | sed 's/\(.*\)\([sd]f\)/\1 \2/' __addd sf3
In the referenced GCC file, the sed expression is constructed in several steps, one input is hardfp_float_modes := sf df which is transformed via hardfp_mode_regexp := $(shell echo $(hardfp_float_modes) | sed 's/ /\\|/g') which is used in hardfp_defines_for = \ $(shell echo $1 | \ sed 's/\(.*\)\($(hardfp_mode_regexp)\)\($(hardfp_suffix_regexp)\|\)$$/-DFUNC=__& -DOP_\1\3 -DTYPE=\2/') So, it is difficult to use another regex.
(In reply to sebastian.huber from comment #2) OK, so if it's too hard to use GNU sed for the build, wrap BSD sed (for the build) in a script that fixes the RE in the troublesome case(s) and is otherwise pass-thru.
Fixing BSD sed to cope with these regular expressions is not an option? If it is not an option, then please close this bug as "Works As Intended"
I hope to have resolved this properly by the end of the year; take.
^Triage: MIPS support has been de-orbited.