Summary: | GCC MIPS cross-compiler build fails due to BSD sed (needing GNU extensions) | ||
---|---|---|---|
Product: | Base System | Reporter: | sebastian.huber |
Component: | misc | Assignee: | Kyle Evans <kevans> |
Status: | New --- | ||
Severity: | Affects Some People | CC: | bugs, kevans, rb |
Priority: | --- | ||
Version: | CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
sebastian.huber
2019-01-29 10:48:58 UTC
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. |