--- portage/eclass/toolchain.eclass.back 2017-02-28 22:50:50.000000000 +0300 +++ portage/eclass/toolchain.eclass 2017-04-09 15:04:27.000000000 +0300 @@ -709,13 +709,19 @@ # this only makes sense for some Linux targets case ${CTARGET} in - x86_64*-linux*) config="i386" ;; - powerpc64*-linux*) config="rs6000" ;; - sparc64*-linux*) config="sparc" ;; - s390x*-linux*) config="s390" ;; + x86_64*-linux*) config="i386/t-linux64" ;; + powerpc64*-linux*) config="rs6000/t-linux64" ;; + sparc64*-linux*) config="sparc/t-linux64" ;; + s390x*-linux*) config="s390/t-linux64" ;; + x86_64*-freebsd*) + if [ ! -f "${S}/gcc/config/i386/t-freebsd64" ] ; then + return 0; + fi + + config="i386/t-freebsd64" + ;; *) return 0 ;; esac - config+="/t-linux64" local sed_args=() if tc_version_is_at_least 4.6 ; then @@ -1517,7 +1523,7 @@ local map=() case ${CTARGET} in mips*) map=("o32 32" "n32 n32" "n64 64") ;; - x86_64*) map=("amd64 m64" "x86 m32" "x32 mx32") ;; + x86_64*) map=("amd64 m64" "x86 m32" "x32 mx32" "amd64_fbsd m64" "x86_fbsd m32") ;; esac local m