[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: question cross-compiler



Brian Murphy wrote:
> Frank Loeffler wrote:
> 
> >
> >export PATH=~/mips/crossdev/build/bin:$PATH
> >
> >$ ./configure --prefix=~/mips/crossdev/build/ --target=mips64-linux 
> >--with-newlib --enable-threads
> >
> Did you build binutils with the same prefix and target? You should probably
> also have --with-gnu-as --with-gnu-ld here, it probably defaults to some 
> mips assembler.

Not needed, the mips*-linux config defaults to GNU tools.

> I have just compiled a mips64-linux toolchain with the attached makefiles
> (you just need to say it's for mips64-linux in Makefile.defs).

Why didn't you use the recommended way, along the way of the appended
script? It would have been much less effort, with more reliable results.

> However it gives a lot of warnings when you try to compile 64 bit and it
> seems to be configured for 32 bit despite the 64 in the name. To get 64
> bit longs you need to give -mabi=64 on the commandline.

That's little surprising if you actually built for a mips32isa-elf target,
like the Makefile suggests. Btw, mips32isa-elf doesn't support n32/n64 ABI,
so it's unlikely to work in that case.


Thiemo


#! /bin/bash
#
TARGET=mips64-linux

CVSDIR_BINU=/bigdisk/cvs/src
CVSDIR_GCC=/bigdisk/cvs/gcc

BASEDIR=/bigdisk/combined
COMBDIR=${BASEDIR}/source
BUILDDIR=${BASEDIR}/${TARGET}/build
INSTDIR=${BASEDIR}/${TARGET}/install

set -e

mkdir -p ${BASEDIR}
mkdir -p ${BASEDIR}/${TARGET}
mkdir -p ${COMBDIR}
mkdir -p ${BUILDDIR}
mkdir -p ${INSTDIR}

if [ ! -f ${COMBDIR}/sourcestamp ]; then
	cp -a ${CVSDIR_BINU}/* ${COMBDIR}
	cp -af ${CVSDIR_GCC}/* ${COMBDIR}
	touch ${COMBDIR}/sourcestamp
fi

pushd ${BUILDDIR} >/dev/null
${COMBDIR}/configure --target=${TARGET} \
	--prefix=${INSTDIR} \
	--enable-checking \
	--enable-languages=c \
	--enable-long-long \
	--without-sid \
	--disable-threads \
	--disable-shared
popd >/dev/null

make -C ${BUILDDIR} all-binutils all-ld all-gas all-gcc all-libiberty
make -C ${BUILDDIR} install-binutils install-ld install-gas install-gcc install-libiberty

set +e

GCCTESTFLAGS="--target_board=unix compile.exp"
TESTFLAGS="--target_board=unix"

make -C ${BUILDDIR} check-gcc RUNTESTFLAGS="$GCCTESTFLAGS"
make -C ${BUILDDIR} check-gas RUNTESTFLAGS="$TESTFLAGS"
make -C ${BUILDDIR} check-ld RUNTESTFLAGS="$TESTFLAGS"
make -C ${BUILDDIR} check-binutils RUNTESTFLAGS="$TESTFLAGS"
make -C ${BUILDDIR} check-libiberty RUNTESTFLAGS="$TESTFLAGS"



Reply to: