m68k-elf-gcc build problem

Paul Cadaret gnu@usd.com
Tue Dec 23 00:12:00 GMT 2003


Hello,
I'm trying to build a gcc-3.3.2 on Solaris-7 as a m68k-elf cross compiler.
It dies late in the build as follows:

    ...
    cp gcj gcj-cross
    make[1]: Leaving directory
    `/sd/c0t8d0/opt1/web/sites/ftp.gnu.org/gnu/gcc/gcc-3.3.2/build.m68k-elf/gcc'
    Configuring in m68k-elf/libiberty
    creating cache ../config.cache
    checking whether to enable maintainer-specific portions of
    Makefiles... no
    checking for makeinfo... makeinfo
    configure: warning:
    *** Makeinfo is too old. Info documentation will not be built.
    checking for perl... perl
    checking host system type... m68k-unknown-elf
    checking build system type... sparc-sun-solaris2.7
    checking for m68k-elf-ar... m68k-elf-ar
    checking for m68k-elf-ranlib... m68k-elf-ranlib
    checking for gcc... 
    /sd/c0t8d0/opt1/web/sites/ftp.gnu.org/gnu/gcc/gcc-3.3.2/build.m68k-elf/gcc/xgcc
    -B/sd/c0t8d0/opt1/web/sites/ftp.gnu.org/gnu/gcc/gcc-3.3.2/build.m68k-elf/gcc/
    -B/tools/local.m68k-elf/m68k-elf/bin/
    -B/tools/local.m68k-elf/m68k-elf/lib/ -isystem
    /tools/local.m68k-elf/m68k-elf/include
    checking whether we are using GNU C... yes
    checking whether 
    /sd/c0t8d0/opt1/web/sites/ftp.gnu.org/gnu/gcc/gcc-3.3.2/build.m68k-elf/gcc/xgcc
    -B/sd/c0t8d0/opt1/web/sites/ftp.gnu.org/gnu/gcc/gcc-3.3.2/build.m68k-elf/gcc/
    -B/tools/local.m68k-elf/m68k-elf/bin/
    -B/tools/local.m68k-elf/m68k-elf/lib/ -isystem
    /tools/local.m68k-elf/m68k-elf/include accepts -g... yes
    checking whether 
    /sd/c0t8d0/opt1/web/sites/ftp.gnu.org/gnu/gcc/gcc-3.3.2/build.m68k-elf/gcc/xgcc
    -B/sd/c0t8d0/opt1/web/sites/ftp.gnu.org/gnu/gcc/gcc-3.3.2/build.m68k-elf/gcc/
    -B/tools/local.m68k-elf/m68k-elf/bin/
    -B/tools/local.m68k-elf/m68k-elf/lib/ -isystem
    /tools/local.m68k-elf/m68k-elf/include and cc understand -c and -o
    together... yes
    checking for POSIXized ISC... no
    checking for working const... yes
    checking for inline... inline
    checking for a BSD compatible install... /tools/local/bin/install -c
    checking how to run the C preprocessor... /lib/cpp
    checking for sys/file.h... yes
    checking for sys/param.h... yes
    checking for limits.h... yes
    checking for stdlib.h... yes
    checking for malloc.h... yes
    checking for string.h... yes
    checking for unistd.h... yes
    checking for strings.h... yes
    checking for sys/time.h... yes
    checking for time.h... yes
    checking for sys/resource.h... yes
    checking for sys/stat.h... yes
    checking for sys/mman.h... yes
    checking for fcntl.h... yes
    checking for alloca.h... yes
    checking for sys/pstat.h... no
    checking for sys/sysmp.h... no
    checking for sys/sysinfo.h... yes
    checking for machine/hal_sysinfo.h... no
    checking for sys/table.h... no
    checking for sys/sysctl.h... no
    checking for sys/systemcfg.h... no
    checking for sys/wait.h that is POSIX.1 compatible... no
    checking whether time.h and sys/time.h may both be included... no
    checking whether errno must be declared... yes
    checking for ANSI C header files... no
    checking for uintptr_t... yes
    checking for pid_t... yes
    checking whether the C compiler (
    /sd/c0t8d0/opt1/web/sites/ftp.gnu.org/gnu/gcc/gcc-3.3.2/build.m68k-elf/gcc/xgcc
    -B/sd/c0t8d0/opt1/web/sites/ftp.gnu.org/gnu/gcc/gcc-3.3.2/build.m68k-elf/gcc/
    -B/tools/local.m68k-elf/m68k-elf/bin/
    -B/tools/local.m68k-elf/m68k-elf/lib/ -isystem
    /tools/local.m68k-elf/m68k-elf/include -O2 -g -O2 ) works... no
    configure: error: installation or configuration problem: C compiler
    cannot create executables.
    make: *** [configure-target-libiberty] Error 1



To get this far I have already:
1.  Built and installed  binutils-2.14 for the target m68k-elf
2.  Configured my path so that the gcc configure can find m68k-elf-as, 
m68k-elf-ld, and the other tools
3.  I found an old GCC cross-compile FAQ and I setup a script to run the 
gcc-3.3.2 configure as follows:

      ${SHELL}  ../configure                                        \
            --prefix=$LOCAL                                         \
            --target=m68k-elf                                       \
            --program-prefix=m68k-elf-                              \
            #

4.  As you can see it gets quite a way through the build before it 
croaks however the error doesn't seen like
the build knows that it is constructing a cross compiler at this point.
(Of course the m68k-elf executables are not executable on Solaris.)

Questions:
Q-1:  The obvious question is:  Can I build a m68-elf (or m68k-coff) 
cross version of gcc-3.3.2?
Q-2:  Perhaps the FAQ I found is obsolete so:  Is there a cross-compile 
FAQ that is known to work for building gcc-3.3.2?

Any other suggestions would be appreciated.

Thanks much
Paul




More information about the Gcc-help mailing list