This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Building m68k-coff-gcc


Bill,

I've checked your site for the build instructions, thanks for the link there. Now, I proceed according to your recommendations, but - I'm a lazy guy - I wrote a Makefile. The make process aborts with error, when doing a 'make all-gcc' in the compiler build directory. It tries to build the archive:

##snip
for name in _mulsi3 _udivsi3 _divsi3 _umodsi3 _modsi3 _double _float _floatex _eqdf2 _nedf2 _gtdf2 _gedf2 _ltdf2 _ledf2 _eqsf2 _nesf2 _gtsf2 _gesf2 _ltsf2 _lesf2; \
do \
echo ${name}; \
/home/michl/build/gcc/m68k-coff/m68k-coff-bootstrap-2.95.3/gcc/xgcc -B/home/michl/build/gcc/m68k-coff/m68k-coff-bootstrap-2.95.3/gcc/ -B/usr/local/m68k-coff/bin/ -I/usr/local/m68k-coff/include -O2 -DCROSS_COMPILE -DIN_GCC -g -O2 -I./include -g1 -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I../../../../../sources/gcc/gcc-2.95.3/gcc -I../../../../../sources/gcc/gcc-2.95.3/gcc/config -I../../../../../sources/gcc/gcc-2.95.3/gcc/../include -c -DL${name} libgcc1.S; \
if [ $? -eq 0 ] ; then true; else exit 1; fi; \
mv libgcc1.o ${name}.o; \
m68k-coff-ar-2.95.3 rc tmplibgcc1.a ${name}.o; \
rm -f ${name}.o; \
done
_mulsi3
/bin/sh: m68k-coff-ar-2.95.3: command not found
##/snip

I think, there is some little b.. in that configure jungle: the archiver program is called with the program suffix of the bootstrap compiler.
Below is the Makefile, there are a few options at the top, one may edit according to his local topology.

Who in the WWW is to badmouth for such a scripting bug ? Is there a build scripts documentation, and/or a CVS or RCS or PVCS or bitkeeper repository somewhere in the web, one may have a look in ?

Michael


--snip--
#
# general parameters, describing the target and the local environment
# when starting, we are assumed to be in the build directory.
#
# The install directory (PREFIX) is left unchanged, it is '/usr/local/'
# The binutils and the compiler should get an excecutable prefix, and
# both a version suffix - should, but not MUST ;-)
#
SOURCE_PATH =../../../sources/gcc
BINUTILS_VERSION=2.12.1
GCC_VERSION =2.95.3
HOST =i686-pc-linux-gnu
TARGET =m68k-coff

#
# some useful vars:
#
BINUTILS_SOURCE_PATH =${SOURCE_PATH}/binutils-${BINUTILS_VERSION}
GCC_SOURCE_PATH =${SOURCE_PATH}/gcc-${GCC_VERSION}
PROGRAM_PREFIX =${TARGET}-
GCC_SUFFIX =-${GCC_VERSION}
BINUTILS_SUFFIX =-${BINUTILS_VERSION}
BINUTILS_BUILDDIR =${TARGET}-binutils-${BINUTILS_VERSION}
BOOTSTRAP_BUILDDIR =${TARGET}-bootstrap-${GCC_VERSION}
NEWLIB_BUILDDIR =${TARGET}-newlib
GCC_BUILDDIR =${TARGET}-gcc-${GCC_VERSION}

.PHONY: binutils bootstrap newlib crossgcc

all: binutils bootstrap newlib crossgcc

clean:
-rm -fr ${BINUTILS_BUILDDIR} ${BOOTSTRAP_BUILDDIR} ${NEWLIB_BUILDDIR} ${GCC_BUILDDIR}
#
# the ld-new target isnt THAT secure and unique entry here. Does
# anyone have an idea
#
binutils: ${BINUTILS_BUILDDIR} ${BINUTILS_BUILDDIR}/Makefile \
${BINUTILS_BUILDDIR}/ld/ld-new
${BINUTILS_BUILDDIR}:
mkdir ${BINUTILS_BUILDDIR}
${BINUTILS_BUILDDIR}/Makefile:
cd ${BINUTILS_BUILDDIR}; \
../${BINUTILS_SOURCE_PATH}/configure --host=${HOST} --target=${TARGET} \
--program-prefix=${PROGRAM_PREFIX} --program-suffix=${BINUTILS_SUFFIX}
${BINUTILS_BUILDDIR}/ld/ld-new:
make -C ${BINUTILS_BUILDDIR}
@echo .
@echo Ignore error from make below: binutils have been built successfully.
@echo \'make install\' - as root - is required now.
@echo .
@echo .
false
#
# like above, target gcc-cross may be weak ...
#
bootstrap: ${BOOTSTRAP_BUILDDIR} ${BOOTSTRAP_BUILDDIR}/Makefile \
${BOOTSTRAP_BUILDDIR}/gcc/gcc-cross
${BOOTSTRAP_BUILDDIR}:
mkdir ${BOOTSTRAP_BUILDDIR}
${BOOTSTRAP_BUILDDIR}/Makefile:
cd ${BOOTSTRAP_BUILDDIR}; \
../${GCC_SOURCE_PATH}/configure --host=${HOST} --target=${TARGET} \
--program-prefix=${PROGRAM_PREFIX} --program-suffix=${GCC_SUFFIX} \
--without-headers --with-newlib --with-gnu-as --with-gnu-ld --disable-shared
${BOOTSTRAP_BUILDDIR}/gcc/gcc-cross:
make -C ${BOOTSTRAP_BUILDDIR} all-gcc
@echo .
@echo Ignore error from make below: bootstrap compiler has been built successfully.
@echo \'make install-gcc\' - as root - is required now.
@echo .
@echo .
false

newlib crossgcc:
@echo Don\'t hurry ...
--/snip--

William A. Gatliff wrote:

Michael:


On Mon, Dec 02, 2002 at 05:42:10PM +0100, Michael Svetlik wrote:

Hi, folks.

It's a strange thing: xgcc can't find stdlib.h and unistd.h, when doing a make.
It tries to build the libgcc (m68k-coff-ar rc tmplibgcc2.a ${name}.o;)
gcc 2.95.3 has been configured with
'--target=m68k-coff --program-prefix=m68k-coff- --enable-languages=c --host=i686-pc-linux-gnu', like the binutils were, before.
Building another cross-compiler - h8300hms - from the same sources, works.
BTW, xgcc wants to include files from /usr/local/m68k-coff/include, which does not exist.

Any hints would be welcome ...


Sounds like the h8300's libgcc doesn't need header files, but m68k's does.

You need to build a bootstrap compiler first, then build header files
for the target, then build the full cross compiler.

See: http://billgatliff.com/twiki/bin/view/Crossgcc/WebHome


b.g.



------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]