https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81421
--- Comment #14 from Ian Lance Taylor <ian at airs dot com> --- OK, so the sed command works. Run the sed command redirecting standard output to a file, then see what this prints: grep '^// +build ' FILE It sounds like that will print nothing. The only way I could explain that would be if your grep command acts like either fgrep or egrep rather than normal grep. Do you have GREP_OPTIONS set in your environment? Do you have any symlink from grep to egrep or fgrep?