The use of an Apple sandbox with denied file access permissions into /usr/local exposed that cc1 fails on errors of...
cc1: error: /usr/local/include: Operation not permitted The commonly suggested solution of using --with-local-prefix= set to something other than /usr/local is undeirable on darwin because that creates a compiler which retains library searches in /usr/local/lib despite no longer searching for headers in /usr/local/include (which makes it suspicable to header/library mismatches during builds). The following trivial fix solves the issue by silently ignoring errors from denied permissions as well as non-existent dirs from the stat (cur->name, &st) call in remove_dup() of gcc/incpath.c. Okay for gcc trunk and backports to gcc-5-branch and gcc-6-branch? Jack Howarth
PR78206.patch
Description: Binary data