Cross-platform sed
It's quite easy to accidentally use GNU extensions in sed expressions, which means Solaris builds start failing. See https://phabricator.haskell.org/D740 for an example.
What should we do? Here are a few possibilities:
- Force use of POSIX sed with
--posix
flag. I haven't tested, but maybe this won't work if Solaris sed chokes on the--posix
. Alternately, use$(SED)
and add--posix
only if it's supported - Detect GNU sed in autoconfigure and use
$(SED)
in all Makefile scripts - Stop using sed in the scripts for something else
I don't know if this admonition applies to other random POSIX tools we use.
Trac metadata
Trac field | Value |
---|---|
Version | 7.11 |
Type | Task |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Build System |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | kgardas |
Operating system | |
Architecture |