building cross-ppc64 on RH9
Doug Maxey
dwm at austin.ibm.com
Mon Nov 17 05:15:08 EST 2003
Howdy,
It's been a few years since building a cross gcc, and must say that
over all, it appears much easier. Also have read all the docs that I
could find on the subject.
I am having trouble, however, determining where to put the target
include files for building the initial pass with xgcc. Started with
the instructions from
ftp://ftp.linuxppc64.org/pub/people/amodra/gcc-3.2/bootstrap and
have built in binutils-2.14 and apparently installed ok, but
building the cross-gcc always fails at the point where xgcc is
attempting to pick up the ppc include files...
Have pulled down the latest glibc and attempted to install the
generic headers, but cannot cleanly build or install that either
because I don't have the cross-gcc built yet.
Any hints? It seems that I am missing a crucial first or second step
to get the correct (or at least reasonable) version of the standard
headers installed...
++doug
-------------- next part --------------
cd ~/build/toolchain/gcc-33/
make
/home/dwm/build/toolchain/gcc-33/libiberty
make[1]: Entering directory `/home/dwm/build/toolchain/gcc-33/libiberty'
/home/dwm/build/toolchain/gcc-33/libiberty/testsuite
make[2]: Entering directory `/home/dwm/build/toolchain/gcc-33/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/dwm/build/toolchain/gcc-33/libiberty/testsuite'
make[1]: Leaving directory `/home/dwm/build/toolchain/gcc-33/libiberty'
/home/dwm/build/toolchain/gcc-33/gcc
make[1]: Entering directory `/home/dwm/build/toolchain/gcc-33/gcc'
echo "/* This file is machine generated. Do not edit. */" > tmp-gtyp.h
echo "static const char *srcdir = " >> tmp-gtyp.h
echo "\"/home/dwm/sb/toolchain/gcc-33/gcc\"" >> tmp-gtyp.h
echo ";" >> tmp-gtyp.h
echo "static const char *lang_files[] = {" >> tmp-gtyp.h
ll="/home/dwm/sb/toolchain/gcc-33/gcc/c-lang.c /home/dwm/sb/toolchain/gcc-33/gcc/c-parse.in /home/dwm/sb/toolchain/gcc-33/gcc/c-tree.h /home/dwm/sb/toolchain/gcc-33/gcc/c-decl.c /home/dwm/sb/toolchain/gcc-33/gcc/c-common.c /home/dwm/sb/toolchain/gcc-33/gcc/c-common.h /home/dwm/sb/toolchain/gcc-33/gcc/c-pragma.c /home/dwm/sb/toolchain/gcc-33/gcc/c-objc-common.c "; \
for f in $ll; do \
echo "\"$f\", "; done >> tmp-gtyp.h
echo "NULL};" >> tmp-gtyp.h
echo "static const char *langs_for_lang_files[] = {" >> tmp-gtyp.h
ff="c c c c c c c c "; \
for f in $ff; do \
echo "\"$f\", " ; done >> tmp-gtyp.h
echo "NULL};" >> tmp-gtyp.h
echo "static const char *all_files[] = {" >> tmp-gtyp.h
gf="config.h auto-host.h /home/dwm/sb/toolchain/gcc-33/gcc/../include/ansidecl.h /home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/rs6000.h /home/dwm/sb/toolchain/gcc-33/gcc/config/dbxelf.h /home/dwm/sb/toolchain/gcc-33/gcc/config/elfos.h /home/dwm/sb/toolchain/gcc-33/gcc/config/svr4.h /home/dwm/sb/toolchain/gcc-33/gcc/config/freebsd-spec.h /home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/sysv4.h /home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/linux.h /home/dwm/sb/toolchain/gcc-33/gcc/defaults.h /home/dwm/sb/toolchain/gcc-33/gcc/defaults.h /home/dwm/sb/toolchain/gcc-33/gcc/location.h /home/dwm/sb/toolchain/gcc-33/gcc/../include/hashtab.h /home/dwm/sb/toolchain/gcc-33/gcc/bitmap.h /home/dwm/sb/toolchain/gcc-33/gcc/function.h /home/dwm/sb/toolchain/gcc-33/gcc/rtl.h /home/dwm/sb/toolchain/gcc-33/gcc/optabs.h /home/dwm/sb/toolchain/gcc-33/gcc/tree.h /home/dwm/sb/toolchain/gcc-33/gcc/libfuncs.h /home/dwm/sb/toolchain/gcc-33/gcc/hashtable.h /home/dwm/sb/toolchain/gcc-33/gcc/real.h /!
home/dwm/sb/toolchain/gcc-33/gcc/varray.h /home/dwm/sb/toolchain/gcc-33/gcc/ssa.h /home/dwm/sb/toolchain/gcc-33/gcc/insn-addr.h /home/dwm/sb/toolchain/gcc-33/gcc/cselib.h /home/dwm/sb/toolchain/gcc-33/gcc/c-common.h /home/dwm/sb/toolchain/gcc-33/gcc/c-tree.h /home/dwm/sb/toolchain/gcc-33/gcc/basic-block.h /home/dwm/sb/toolchain/gcc-33/gcc/alias.c /home/dwm/sb/toolchain/gcc-33/gcc/bitmap.c /home/dwm/sb/toolchain/gcc-33/gcc/cselib.c /home/dwm/sb/toolchain/gcc-33/gcc/dwarf2out.c /home/dwm/sb/toolchain/gcc-33/gcc/emit-rtl.c /home/dwm/sb/toolchain/gcc-33/gcc/except.c /home/dwm/sb/toolchain/gcc-33/gcc/explow.c /home/dwm/sb/toolchain/gcc-33/gcc/expr.c /home/dwm/sb/toolchain/gcc-33/gcc/fold-const.c /home/dwm/sb/toolchain/gcc-33/gcc/function.c /home/dwm/sb/toolchain/gcc-33/gcc/gcse.c /home/dwm/sb/toolchain/gcc-33/gcc/integrate.c /home/dwm/sb/toolchain/gcc-33/gcc/lists.c /home/dwm/sb/toolchain/gcc-33/gcc/optabs.c /home/dwm/sb/toolchain/gcc-33/gcc/profile.c /home/dwm/sb/toolchain/gcc-3!
3/gcc/ra-build.c /home/dwm/sb/toolchain/gcc-33/gcc/regclass.c!
/home/dwm/sb/toolchain/gcc-33/gcc/reg-stack.c /home/dwm/sb/toolchain/gcc-33/gcc/sdbout.c /home/dwm/sb/toolchain/gcc-33/gcc/stmt.c /home/dwm/sb/toolchain/gcc-33/gcc/stor-layout.c /home/dwm/sb/toolchain/gcc-33/gcc/tree.c /home/dwm/sb/toolchain/gcc-33/gcc/varasm.c /home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/rs6000.c /home/dwm/sb/toolchain/gcc-33/gcc/c-lang.c /home/dwm/sb/toolchain/gcc-33/gcc/c-parse.in /home/dwm/sb/toolchain/gcc-33/gcc/c-tree.h /home/dwm/sb/toolchain/gcc-33/gcc/c-decl.c /home/dwm/sb/toolchain/gcc-33/gcc/c-common.c /home/dwm/sb/toolchain/gcc-33/gcc/c-common.h /home/dwm/sb/toolchain/gcc-33/gcc/c-pragma.c /home/dwm/sb/toolchain/gcc-33/gcc/c-objc-common.c"; \
for f in $gf; do \
echo "\"$f\", "; done >> tmp-gtyp.h
echo " NULL};" >> tmp-gtyp.h
echo "static const char *lang_dir_names[] = { \"c\", " >> tmp-gtyp.h
gf=""; \
for l in $gf; do \
echo "\"$l\", "; done >> tmp-gtyp.h
echo "NULL};" >> tmp-gtyp.h
/bin/sh /home/dwm/sb/toolchain/gcc-33/gcc/move-if-change tmp-gtyp.h gtyp-gen.h
gtyp-gen.h is unchanged
(cd intl && make all)
/home/dwm/build/toolchain/gcc-33/gcc/intl
make[2]: Entering directory `/home/dwm/build/toolchain/gcc-33/gcc/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/dwm/build/toolchain/gcc-33/gcc/intl'
if [ -f specs.ready ] ; then \
true; \
else \
echo timestamp > specs.ready; \
fi
make GCC_FOR_TARGET="/home/dwm/build/toolchain/gcc-33/gcc/xgcc -B/home/dwm/build/toolchain/gcc-33/gcc/ -B/opt/ppc64-33/powerpc-linux/bin/ -B/opt/ppc64-33/powerpc-linux/lib/ -isystem /opt/ppc64-33/powerpc-linux/include" \
BUILD_PREFIX="" BUILD_PREFIX_1="loser-" \
AR_FOR_TARGET="powerpc-linux-ar" \
AR_CREATE_FOR_TARGET="powerpc-linux-ar rc" \
AR_FLAGS_FOR_TARGET="" \
CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long " \
RANLIB_FOR_TARGET="powerpc-linux-ranlib" \
RANLIB_TEST_FOR_TARGET="[ -f powerpc-linux-ranlib ] || ( [ "i686-pc-linux-gnu" = "powerpc-unknown-linux-gnu" ] && [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )" \
NM_FOR_TARGET="/opt/ppc64-33/powerpc-linux/bin/nm" AWK="gawk" \
LIBGCC2_CFLAGS="-O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc" \
INCLUDES="-I. -I. -I/home/dwm/sb/toolchain/gcc-33/gcc -I/home/dwm/sb/toolchain/gcc-33/gcc/. -I/home/dwm/sb/toolchain/gcc-33/gcc/config -I/home/dwm/sb/toolchain/gcc-33/gcc/../include" \
CONFIG_H="config.h auto-host.h /home/dwm/sb/toolchain/gcc-33/gcc/../include/ansidecl.h /home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/rs6000.h /home/dwm/sb/toolchain/gcc-33/gcc/config/dbxelf.h /home/dwm/sb/toolchain/gcc-33/gcc/config/elfos.h /home/dwm/sb/toolchain/gcc-33/gcc/config/svr4.h /home/dwm/sb/toolchain/gcc-33/gcc/config/freebsd-spec.h /home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/sysv4.h /home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/linux.h /home/dwm/sb/toolchain/gcc-33/gcc/defaults.h /home/dwm/sb/toolchain/gcc-33/gcc/defaults.h insn-constants.h insn-flags.h" MACHMODE_H="machmode.h machmode.def /home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/rs6000-modes.def" \
LIB1ASMSRC='' \
MAKEOVERRIDES= \
-f libgcc.mk all
make[2]: Entering directory `/home/dwm/build/toolchain/gcc-33/gcc'
for d in libgcc nof libgcc/nof; do \
if [ -d $d ]; then true; else /bin/sh /home/dwm/sb/toolchain/gcc-33/gcc/mkinstalldirs $d; fi; \
done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/home/dwm/build/toolchain/gcc-33/gcc/xgcc -B/home/dwm/build/toolchain/gcc-33/gcc/ -B/opt/ppc64-33/powerpc-linux/bin/ -B/opt/ppc64-33/powerpc-linux/lib/ -isystem /opt/ppc64-33/powerpc-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/home/dwm/sb/toolchain/gcc-33/gcc -I/home/dwm/sb/toolchain/gcc-33/gcc/. -I/home/dwm/sb/toolchain/gcc-33/gcc/config -I/home/dwm/sb/toolchain/gcc-33/gcc/../include -fPIC -mstrict-align -DL_muldi3 -c /home/dwm/sb/toolchain/gcc-33/gcc/libgcc2.c -o libgcc/./_muldi3.o
In file included from tconfig.h:22,
from /home/dwm/sb/toolchain/gcc-33/gcc/libgcc2.c:36:
/home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/linux.h:89:20: signal.h: No such file or directory
In file included from tconfig.h:22,
from /home/dwm/sb/toolchain/gcc-33/gcc/libgcc2.c:36:
/home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/linux.h:98: error: parse error before "stack_t"
/home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/linux.h:98: warning: no semicolon at end of struct or union
/home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/linux.h:100: error: parse error before "uc_sigmask"
/home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/linux.h:100: warning: type defaults to `int' in declaration of `uc_sigmask'
/home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/linux.h:100: warning: data definition has no type or storage class
/home/dwm/sb/toolchain/gcc-33/gcc/config/rs6000/linux.h:99: error: storage size of `uc_mcontext' isn't known
make[2]: *** [libgcc/./_muldi3.o] Error 1
make[2]: Leaving directory `/home/dwm/build/toolchain/gcc-33/gcc'
make[1]: *** [stmp-multilib] Error 2
make[1]: Leaving directory `/home/dwm/build/toolchain/gcc-33/gcc'
make: *** [all-gcc] Error 2
Compilation exited abnormally with code 2 at Sat Nov 15 14:50:41
More information about the Linuxppc64-dev
mailing list