The AC_SYS_LONG_FILE_NAMES autoconf macro attempts to write to /usr/tmp if that directory exists and is writable. It probably makes sense to whitelist this path by default. From autoconf/specific.m4: # Test for long file names in all the places we know might matter: # . the current directory, where building will happen # $prefix/lib where we will be installing things # $exec_prefix/lib likewise # $TMPDIR if set, where it might want to write temporary files # /tmp where it might want to write temporary files # /var/tmp likewise # /usr/tmp likewise It seems like $prefix/lib and $exec_prefix/lib might also be problematic if userpriv is disabled in portage.
Apparently we already do this in /etc/sandbox.d/00default. My mistake.