--- gcc/config/rs6000/t-freebsd64.orig 2015-03-04 21:56:46.000000000 +0000 +++ gcc/config/rs6000/t-freebsd64 2018-11-12 01:06:34.489087000 +0000 @@ -21,9 +21,28 @@ # On FreeBSD the 32-bit libraries are found under /usr/lib32. # Set MULTILIB_OSDIRNAMES according to this. -MULTILIB_OPTIONS = m32 -MULTILIB_DIRNAMES = 32 -MULTILIB_EXTRA_OPTS = fPIC mstrict-align -MULTILIB_EXCEPTIONS = -MULTILIB_OSDIRNAMES = ../lib32 +MULTILIB_OPTIONS = +MULTILIB_DIRNAMES = +MULTILIB_MATCHES = +MULTILIB_EXCEPTIONS = + +MULTILIB_OPTIONS += m64/m32 +MULTILIB_DIRNAMES += 64 32 + +MULTILIB_OPTIONS += mbig-endian/mlittle-endian +MULTILIB_DIRNAMES += be le + +MULTILIB_OPTIONS += mabi=elfv1/mabi=elfv2 +MULTILIB_DIRNAMES += elfv1 elfv2 + +MULTILIB_EXTRA_OPTS := fPIC mstrict-align + +# Use MULTILIB_REQUIRED to define the relevant combinations. +MULTILIB_REQUIRED += m64/mbig-endian/mabi=elfv1 +MULTILIB_REQUIRED += m64/mbig-endian/mabi=elfv2 +MULTILIB_REQUIRED += m64/mlittle-endian/mabi=elfv2 +MULTILIB_REQUIRED += m32/mbig-endian/mabi=elfv1 + +# For ports gcc, we do not use the osdir. +#MULTILIB_OSDIRNAMES := m64=../lib m32=../lib32