--- eclass/toolchain.eclass~superh4-gcc4-multilib 2006-09-08 08:27:58.029315000 +0200 +++ eclass/toolchain.eclass 2006-09-08 09:12:45.399315000 +0200 @@ -1118,10 +1118,31 @@ gcc-library-configure() { || confgcc="${confgcc} --enable-multilib" } +gcc4-superh-multilib-configure() { + local mlliblist + if [[ ${CTARGET} == sh4-* ]] ; then + mliblist="m4,m4-nofpu,m4-single" + elif [[ ${CTARGET} == sh4a-* ]] ; then + mliblist="m4a,m4a-nofpu,m4a-single" + elif [[ ${CTARGET} == sh3-* ]] ; then + mliblist="m3,m3e" + elif [[ ${CTARGET} == sh2-* ]] ; then + mliblist="m2,m2e" + fi + if [[ x"${mliblist}" != x"" ]] ; then + confgcc="${confgcc} --enable-multilib --with-multilib-list=${mliblist}" + einfo "SuperH GCC4 multilib list: ${mliblist}" + elif [[ ${CTARGET} = *-linux* ]] ; then + confgcc="${confgcc} --disable-multilib" + fi +} + gcc-compiler-configure() { # multilib support if is_multilib ; then confgcc="${confgcc} --enable-multilib" + elif [[ ${CTARGET} == sh* ]] && tc_version_is_at_least "4.0" ; then + gcc4-superh-multilib-configure elif [[ ${CTARGET} == *-linux* ]] ; then confgcc="${confgcc} --disable-multilib" fi