This adds 32-bit little endian MIPS support to the v8-9999 ebuild. Big endian and 64bit aren't mentioned in the v8 sources so I chose to let the ebuild bail out early if one tries to build it on 64bit and/or big endian MIPS machines. Very lightly tested, but the resulting v8 works so far on my mipsel-softfloat-linux-gnu machines. --- v8-9999.ebuild~mips 2013-04-29 21:01:08.000000000 +0200 +++ v8-9999.ebuild 2013-07-09 13:02:26.002025657 +0200 @@ -66,6 +66,28 @@ src_configure() { myconf+=" -Darmv7=0" fi myconf+=" $(gyp_use neon arm_neon)" ;; + mips*) + if [[ ${CHOST} == mips*el* ]] ; then + myarch="mipsel" + myconf+=" -Dv8_target_arch=mipsel" + else + die "big-endian MIPS is not yet supported" + fi + if [[ ${CHOST} == *softfloat* ]] ; then + myconf+=" -Dv8_use_mips_abi_hardfloat=false" + else + myconf+=" -Dv8_use_mips_abi_hardfloat=true" + fi + if [[ ${CHOST} == *loongson* ]] ; then + myconf+=" -Dmips_arch_variant=loongson" + elif [[ ${CHOST} == mips*64* ]] ; then + die "generic MIPS 64bit is not yet supported" + elif [[ ${CHOST} == mips*r2* ]] ; then + myconf+=" -Dmips_arch_variant=mips32r2" + else + myconf+=" -Dmips_arch_variant=mips32" + fi + ;; *) die "Unrecognized CHOST: ${CHOST}" esac