Add 32-bit mips support to base/binutils and base/gcc.
- When cross-building packages, set ARCH to the target arch instead of the arch of the build host. This fixes bsd.ssp.mk on MIPS which was trying to enable SSP on MIPS cross-built packages because the host ARCH was amd64. A new HOST_ARCH variable is added to set the --build triple for configure scripts, but I believe most other uses of ARCH in ports are really about the target, not the build host so this is the more correct general direction.
- Some updates to base/binutils and base/gcc to use ARCH as the target architecture.
- Drop the extra arguments to GCC to set include and library paths and only set --sysroot.
- Move the --sysroot flags into CC, CXX, CPP (which is now set to XCPP) and LD instead of passing it in CFLAGS, etc. The base/gcc build uses ends up using the CFLAGS when building native binaries for the build host which fails when tripping over the --sysroot. I think this might have accidentally worked before because the powerpc64 headers in /usr/include/machine were "close enough" to the amd64 headers, but with 32-bit MIPS this failed hard.
- Add the GCC MIPS patch from devel/powerpc64-gcc to base/gcc to add MIPS support to base/gcc.
- Add a MIPS plist for base/binutils.
- Set helper variables for the base/gcc plist to tag architecture-specific headers (e.g. for intrinsincs) and use these to tag powerpc and MIPS specific headers.
- Drop the include-fixed headers from base/gcc.
- Strip /usr/local/include from the default list of include paths for base/gcc.
- Use libc++'s include path for C++ for base/gcc.
Reviewed by: bapt
Approved by: portmgr (bapt)
Differential Revision: https://reviews.freebsd.org/D15267