On 21 February 2017 at 13:50, Burton, Ross <ross.burton@intel.com> wrote:
I'm a big fan of fixing upstream so we don't have to carry a patch forever.  Their rationale I don't understand, but the implementation is clearly broken.

Here's my current fix:

+      cf_flags=`echo "$CC" | awk  'BEGIN{ORS=" ";RS=" "} /^-.+/ {print $1}'`
+      CC=`echo "$CC " | awk  'BEGIN{ORS=" ";RS=" "} /^[^-].+/ {print $1}'` 

Works for ccache, and doesn't involve a long/horrible sed.  I've also sent it upstream.

Ross