--- boot0-9.1_rc3.ebuild.orig 2012-11-06 21:52:54.000000000 +0900 +++ boot0-9.1_rc3.ebuild 2012-11-25 02:13:26.000000000 +0900 @@ -34,6 +34,21 @@ } src_prepare() { + #gcc 4.6 support + if [ `echo $(tc-getCC) | grep gcc` ] ; then + GCCVER=`$(tc-getCC) -dumpversion` + GCCMAJOR=`echo ${GCCVER} | cut -f1 -d.` + GCCMINOR=`echo ${GCCVER} | cut -f2 -d.` + if [[ ${GCCMAJOR} -eq 4 && ${GCCMINOR} -ge 6 ]] ; then + einfo "Detect gcc-4.6 or later version." + epatch "${FILESDIR}"/${PN}-9.1-gcc46.patch + sed -i -e '/-m elf_i386_fbsd/d' "${S}"/i386/Makefile.inc || die + for dir in boot2 gptboot zfsboot gptzfsboot; do + sed -i -e 's:^LDFLAGS=\(.*\):LDFLAGS=\1 -m elf_i386_fbsd:' "${S}"/i386/${dir}/Makefile || die + done + fi + fi + sed -e '/-fomit-frame-pointer/d' -e '/-mno-align-long-strings/d' \ -i "${S}"/i386/boot2/Makefile \ -i "${S}"/i386/gptboot/Makefile \