|
|
inherit eutils | inherit eutils |
| |
PATCH_VERSION=${PV:5} | PATCH_VERSION=${PV:5} |
GCC_SNAPSHOT="20050326" |
|
BASE_BINUTILS="2.15" | BASE_BINUTILS="2.15" |
GCC_VER=4.0 |
GCC_VER="4.0.0" |
BIN_VER=${BASE_BINUTILS:0:4} | BIN_VER=${BASE_BINUTILS:0:4} |
ENV_FILE=${D}/etc/env.d/99tigcc | ENV_FILE=${D}/etc/env.d/99tigcc |
S=$WORKDIR | S=$WORKDIR |
|
|
HOMEPAGE="http://tigcc.ticalc.org" | HOMEPAGE="http://tigcc.ticalc.org" |
| |
SRC_URI="mirror://gentoo/${PF}.tar.bz2 | SRC_URI="mirror://gentoo/${PF}.tar.bz2 |
ftp://gcc.gnu.org/pub/gcc/snapshots/4.0-${GCC_SNAPSHOT}/gcc-4.0-${GCC_SNAPSHOT}.tar.bz2 |
mirror://gentoo/gcc-${GCC_VER}.tar.bz2 |
mirror:/kernel/linux/devel/binutils/binutils-${BASE_BINUTILS}.tar.bz2 | mirror:/kernel/linux/devel/binutils/binutils-${BASE_BINUTILS}.tar.bz2 |
http://members.chello.at/gerhard.kofler/kevin/ti89prog/libfargo.zip | http://members.chello.at/gerhard.kofler/kevin/ti89prog/libfargo.zip |
http://members.chello.at/gerhard.kofler/kevin/ti89prog/flashosa.zip" | http://members.chello.at/gerhard.kofler/kevin/ti89prog/flashosa.zip" |
|
|
KEYWORDS="~x86 ~ppc ~sparc ~amd64" | KEYWORDS="~x86 ~ppc ~sparc ~amd64" |
IUSE="doc" | IUSE="doc" |
| |
DEPEND="virtual/glibc |
DEPEND="virtual/libc |
>=sys-devel/binutils-2.14.90.0.6-r1 | >=sys-devel/binutils-2.14.90.0.6-r1 |
>=sys-devel/bison-1.875" | >=sys-devel/bison-1.875" |
| |
src_unpack() { | src_unpack() { |
unpack ${A} | unpack ${A} |
sed -ie s/20050319/${GCC_SNAPSHOT}/ sources/gcc/gcc-4.0-tigcc-patch.diff |
|
# start by patching and cleaning out binutils and gcc directories. | # start by patching and cleaning out binutils and gcc directories. |
cd ${WORKDIR}/binutils-${BASE_BINUTILS} | cd ${WORKDIR}/binutils-${BASE_BINUTILS} |
epatch ${S}/sources/gcc/gas-${BIN_VER}-tigcc-*.diff | epatch ${S}/sources/gcc/gas-${BIN_VER}-tigcc-*.diff |
|
|
rm -f -r ld | rm -f -r ld |
rm -f -r texinfo | rm -f -r texinfo |
| |
cd ${WORKDIR}/gcc-4.0-${GCC_SNAPSHOT} |
cd ${WORKDIR}/gcc-${GCC_VER} |
epatch ${S}/sources/gcc/gcc-4.0-tigcc-patch.diff | epatch ${S}/sources/gcc/gcc-4.0-tigcc-patch.diff |
| |
rm -f .brik | rm -f .brik |
|
|
| |
# build gcc | # build gcc |
cd ${WORKDIR}/build/gcc | cd ${WORKDIR}/build/gcc |
CFLAGS="${CFLAGS}" ${WORKDIR}/gcc-4.0-${GCC_SNAPSHOT}/configure --target=m68k-coff \ |
CFLAGS="${CFLAGS}" ${WORKDIR}/gcc-${GCC_VER}/configure --target=m68k-coff \ |
--with-gnu-as --with-as=${WORKDIR}/build/binutils/gas/as-new --with-gnu-ld \ | --with-gnu-as --with-as=${WORKDIR}/build/binutils/gas/as-new --with-gnu-ld \ |
--disable-nls --disable-multilib --disable-shared --enable-static \ | --disable-nls --disable-multilib --disable-shared --enable-static \ |
--disable-threads --enable-languages=c --disable-win32-registry \ | --disable-threads --enable-languages=c --disable-win32-registry \ |
|
|
| |
# GCC compilations _is intended_ to fail on a certain point, | # GCC compilations _is intended_ to fail on a certain point, |
# don't worry about that. | # don't worry about that. |
emake |
emake -j1 |
| |
# Check if gcc has been built, die otherwise | # Check if gcc has been built, die otherwise |
( [ -e ${WORKDIR}/build/gcc/gcc/xgcc ] && [ -e ${WORKDIR}/build/gcc/gcc/cc1 ] ) || die "gcc" | ( [ -e ${WORKDIR}/build/gcc/gcc/xgcc ] && [ -e ${WORKDIR}/build/gcc/gcc/cc1 ] ) || die "gcc" |