Re: Building a cross compiler, and unsure about the use of --without-headers

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

 



16.3.2011 19:22, David Paterson kirjoitti:

Would it work with adding Binutils as well?

The binutils sources aren't in sync with GCC sources. This has been
discussed recently on this list. Building also GDB separately is the
assumtion, trying to combine the sources may succeed but it would
be much easier to keep them as separately updated components in a
crosstoolchain. Generally the first build time is only a special
"bootstrap" case and later one just updates the components GCC,
binutils, GDB and newlib one at a time instead of starting everything
from scratch again...

BTW, I didn't answer anything for the Ada and Fortran issue... But
when I tried gcc-4.5.2 for 'sparc-elf' using
'--enable-languages=c,c++,ada,fortran' I first got a message saying
that GNAT is required on the $host for Ada. After removing and trying
with only 'fortran' being added, the build crashed in the libgfortran
configure. Why, wasn't yet very clear, the 'config.log' there only
gave :

configure:4272: checking dependency style of /home/src/gcc-4.5.2/build/./gcc/xgc c -B/home/src/gcc-4.5.2/build/./gcc/ -nostdinc -B/home/src/gcc-4.5.2/build/sparc -elf/newlib/ -isystem /home/src/gcc-4.5.2/build/sparc-elf/newlib/targ-include -i system /home/src/gcc-4.5.2/newlib/libc/include -B/home/src/gcc-4.5.2/build/sparc -elf/libgloss/sparc -L/home/src/gcc-4.5.2/build/sparc-elf/libgloss/libnosys -L/h ome/src/gcc-4.5.2/libgloss/sparc -B/usr/local/sparc-elf/bin/ -B/usr/local/sparc- elf/lib/ -isystem /usr/local/sparc-elf/include -isystem /usr/local/sparc-elf/sys
-include
configure:4382: result: gcc3
configure:4414: checking whether symbol versioning is supported
configure:4425: error: Link tests are not allowed after GCC_NO_EXECUTABLES.

My guess is that a link test was done and it didn't succeed... The
'--with-newlib' hadn't any influence to the libgfortran configure
and one should fix the 'specs' or something in order to get some
default real target for which to create executables. When trying
to compile and link with the earlier installed gcc-4.4.5, the result
was :

/usr/local/lib/gcc/sparc-elf/4.4.5/collect2 -o tst_sparc-elf-4.4.x /usr/local/lib/gcc/sparc-elf/4.4.5/../../../../sparc-elf/lib/crt0.o /usr/local/lib/gcc/sparc-elf/4.4.5/crti.o /usr/local/lib/gcc/sparc-elf/4.4.5/crtbegin.o -L/usr/local/lib/gcc/sparc-elf/4.4.5 -L/usr/local/lib/gcc/sparc-elf/4.4.5/../../../../sparc-elf/lib /tmp/ccDuw7Hu.o -lgcc -lgcc /usr/local/lib/gcc/sparc-elf/4.4.5/crtend.o /usr/local/lib/gcc/sparc-elf/4.4.5/crtn.o /usr/local/lib/gcc/sparc-elf/4.4.5/../../../../sparc-elf/lib/crt0.o: In function `start': /home/src/gcc-4.4.3/build/sparc-elf/soft/v8/libgloss/sparc/../../../../../../libgloss/sparc/crt0.S:35: undefined reference to `__stack' /home/src/gcc-4.4.3/build/sparc-elf/soft/v8/libgloss/sparc/../../../../../../libgloss/sparc/crt0.S:36: undefined reference to `__stack' /usr/local/lib/gcc/sparc-elf/4.4.5/../../../../sparc-elf/lib/crt0.o: In function `init': /home/src/gcc-4.4.3/build/sparc-elf/soft/v8/libgloss/sparc/../../../../../../libgloss/sparc/crt0.S:130: undefined reference to `hardware_init_hook' /home/src/gcc-4.4.3/build/sparc-elf/soft/v8/libgloss/sparc/../../../../../../libgloss/sparc/crt0.S:131: undefined reference to `hardware_init_hook'

So, with its defaults the 'sparc-elf' target toolchain doesn't produce
executables for something... And it looks like C and C++ are fine but
other languages may be problematic without extra patches to the sources
or manual intervention during the build, for instance editing the
'specs' file for '*endfile' to include some linker script for some
real board/monitor. There seemed to be support for 'cygmon' in libgloss.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux