This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Ladies & Gentlemen I just found out about this list while searching for help building a cross hosted on hppa1.1-hp.hpux10.20 for m68k-*-aout. I'm sure coff would be OK too. My actual target is a m68332. My most recent effort and what I will describe here is taken from the embedded FAQ. I hope I haven't committed some social offence by posting such a large message, but fire-walls and such prevent me from putting it in some public place. I am continuing to work on this and hope for some illumination from the gurus on this list. Thanks to any and all who help, Ray The prob: The 'make' proceeds until it fails on the first attempts to run the newly created 'xgcc' which core dumps due to having received SIGABRT. I have used gdb to determine that this is caused by a call to xmalloc() place at line 4392 of gcc.c. A buffer is being allocated to process the arguments. xmalloc() tries to access memory at address 0. These is nothing sinister about the file SYSCALLS.c. xgcc never even gets far enough to open it. My suspicion is some interaction between newlib and hpux, but at this point I don't know what's going on. There is a call to alloca() in snapshot_warning() at line 4389 which succeeds. from gcc.c (v2.8.1) 4387 /* If this is a test release of GCC, issue a warning. */ 4388 if (version_string[0] == 't' && version_string[1] == 'e') 4389 snapshot_warning (); 4390 4391 argbuf_length = 10; --> 4392 argbuf = (char **) xmalloc (argbuf_length * sizeof (char *)); 4393 4394 obstack_init (&obstack); Attempting to do the one pass installation of GCC+BinUtils I have followed the steps outlined in Sec 3.2 of the FAQ: I have acquired and installed: gcc-2.8.1 binutils-2.9.1 newlib-1.8.1 Applied patch: patch-2.5 Ran: one-tree-1.5.sh Made a build directory: Configured thusly: ../src/configure \ --prefix=/opt/xgcc68k \ --target=m68k-*-coff \ --with-stabs \ --program-prefix=x \ --program-suffix=-68k \ --with-gnu-as \ --with-gnu-ld \ --enable-m68332 ## ## configure output ## Configuring gcc... loading cache ../config.cache checking host system type... hppa1.1-hp-hpux10.20 checking target system type... m68k-*-coff checking build system type... hppa1.1-hp-hpux10.20 checking for gcc... (cached) gcc checking whether the C compiler (gcc -g -O2 ) works... yes checking whether the C compiler (gcc -g -O2 ) is a cross-compiler... no checking whether we are using GNU C... (cached) yes checking whether gcc accepts -g... (cached) yes checking whether make sets ${MAKE}... (cached) yes checking for mawk... no checking for gawk... no checking for nawk... no checking for awk... awk checking for flex... (cached) flex checking for yywrap in -lfl... (cached) no checking for ranlib... (cached) ranlib checking for bison... (cached) bison -y checking for a BSD compatible install... ../../src/gcc/install.sh -c checking how to run the C preprocessor... (cached) gcc -E checking for ANSI C header files... yes checking whether time.h and sys/time.h may both be included... (cached) yes checking for limits.h... yes checking for stddef.h... (cached) yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking for stdlib.h... (cached) yes checking for time.h... (cached) yes checking for fcntl.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/file.h... (cached) yes checking for sys/time.h... (cached) yes checking for sys/resource.h... yes checking for sys/param.h... yes checking for sys/times.h... yes checking for inttypes.h... yes checking for strerror... yes checking for putenv... yes checking for popen... yes checking for vprintf... yes checking for bcopy... yes checking for bzero... yes checking for bcmp... yes checking for index... yes checking for rindex... yes checking for kill... yes checking for getrlimit... yes checking for setrlimit... yes checking for sysconf... (cached) yes checking whether malloc must be declared... no checking whether realloc must be declared... no checking whether calloc must be declared... no checking whether free must be declared... no checking whether index must be declared... yes checking whether rindex must be declared... yes checking whether getenv must be declared... no checking whether sbrk must be declared... no checking for sys_siglist declaration in signal.h or unistd.h... no Using `../../src/gcc/config/m68k/m68k.c' to output insns. Using `../../src/gcc/config/m68k/m68k.md' as machine description file. Using the following target machine macro files: ../../src/gcc/config/m68k/m68k-coff.h ../../src/gcc/config/dbx.h ../../src/gcc/config/libgloss.h Using `../../src/gcc/config/pa/xm-pahpux.h' as host machine macro file. Links are now set up to build a cross-compiler for m68k-*-coff from hppa1.1-hp-hpux10.20. updating cache ../config.cache creating ./config.status creating Makefile creating cp/Makefile creating auto-config.h Configuring etc... loading cache ../config.cache checking for a BSD compatible install... ../../src/etc/../install-sh -c creating ./config.status creating Makefile make all The 'make' proceeds until it first attempts to run the newly created 'xgcc'. [ Lots of apparently normal (to me) messages clipped. ] [ ... ] gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -o unprotoize \ unprotoize.o getopt.o getopt1.o getpwd.o version.o \ pexecute.o choose-temp.o obstack.o ` case "gcc" in "cc") echo "alloca.o" ;; esac ` /bin/sh ../../src/gcc/genmultilib \ "m68000/m68020/m5200 m68881/msoft-float" \ "" \ "m68000=mc68000 m68000=m68302 m68000=m68332 m68020=mc68020 m68020=m68040" \ "*m5200/*m68881 *m5200/*msoft-float" \ "" > tmp-mlib.h ../../src/gcc/move-if-change tmp-mlib.h multilib.h touch s-mlib ## ## Here is the compile and link of 'gcc.c' ## gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -I. -I../../src/gcc -I../../src/gcc/config \ -DSTANDARD_STARTFILE_PREFIX=\"/opt/xgcc68k/lib/\" -DSTANDARD_EXEC_PREFIX=\"/opt/xgcc68k/lib/gcc-lib/\" -DDEFAULT_TARGET_VERSION=\"testgcc-tn\" -DDEFAULT_TARGET_MACHINE=\"m68k-*-coff\" -DTOOLDIR_BASE_PREFIX=\"/opt/xgcc68k/\" \ -c `echo ../../src/gcc/gcc.c | sed 's,^\./,,'` gcc -DCROSS_COMPILE -DIN_GCC -g -O2 -DHAVE_CONFIG_H -o xgcc gcc.o prefix.o version.o \ choose-temp.o pexecute.o obstack.o ` case "gcc" in "cc") echo "alloca.o" ;; esac ` rm -rf include mkdir include if [ xfixincludes != xMakefile.in ]; \ then \ for dir in /opt/xgcc68k/m68k-*-coff/sys-include ; do \ if [ -d $dir ]; \ then \ /bin/sh ../../src/gcc/fixincludes include $dir; \ else true; fi; \ done; \ else true; \ fi rm -f include/syslimits.h if [ -f include/limits.h ]; then \ mv include/limits.h include/syslimits.h; \ else \ cp ../../src/gcc/gsyslimits.h include/syslimits.h; \ fi chmod a+r include/syslimits.h touch stmp-fixinc if [ -f /opt/xgcc68k/m68k-*-coff/sys-include/limits.h ] ; then \ cat ../../src/gcc/limitx.h ../../src/gcc/glimits.h ../../src/gcc/limity.h > tmp-xlimits.h; \ else \ cat ../../src/gcc/glimits.h > tmp-xlimits.h; \ fi mv tmp-xlimits.h xlimits.h de/math-68881.h ../../src/gcc/cp/inc/typeinfo ../../src/gcc/cp/inc/exception ../../src/gcc/cp/inc/new ../../src/gcc/cp/inc/new.h; do \ if [ X$file != X.. ]; then \ realfile=`echo $file | sed -e 's|.*/\([^/]*\)$|\1|'`; \ touch include/$realfile; \ rm -f include/$realfile; \ cp $file include; \ chmod a+r include/$realfile; \ fi; \ done rm -f include/limits.h cp xlimits.h include/limits.h chmod a+r include/limits.h rm -f include/README cp ../../src/gcc/README-fixinc include/README chmod a+r include/README touch stmp-int-hdrs rm -f SYSCALLS.c tmp-SYSCALLS.s cat ../../src/gcc/sys-types.h ../../src/gcc/sys-protos.h > SYSCALLS.c /users/ray/pkg/Gcc/bld-m68k-coff/gcc/xgcc -B/users/ray/pkg/Gcc/bld-m68k-coff/gcc/ -DCROSS_COMPILE -DIN_GCC -g -O2 -I./include -I. -I../../src/gcc -I../../src/gcc/config \ -aux-info SYSCALLS.c.X -S -o tmp-SYSCALLS.s SYSCALLS.c make[1]: *** [SYSCALLS.c.X] IOT trap (core dumped) make[1]: Leaving directory `/home/ray/pkg/Gcc/bld-m68k-coff/gcc' make: *** [all-gcc] Error 2 ________________________________________________ To get help for the crossgcc list, send mail to crossgcc-request@cygnus.com with the text 'help' (without the quotes) in the body of the message.