In order to build a gcc for a newlib target with a working libgcov, you need build from a unified source tree and configure using --with-headers --with-newlib. Using current mainline sources, when configuring with: ../srcw/configure --target=sh-elf --with-headers --with-newlib the compiler fails to build with: mv tmp-specs specs echo | /mnt/scratch/nightly/2006-05-31/sh-elf/./gcc/xgcc -B/mnt/scratch/nightly/2006-05-31/sh-elf/./gcc/ -nostdinc -B/mnt/scratch/nightly/2006-05-31/sh-elf/sh-elf/newlib/ -isystem /mnt/scratch/nightly/2006-05-31/sh-elf/sh-elf/newlib/targ-include -isystem /mnt/scratch/nightly/2006-05-31/srcw/newlib/libc/include -B/usr/local/sh-elf/bin/ -B/usr/local/sh-elf/lib/ -isystem /usr/local/sh-elf/include -isystem /usr/local/sh-elf/sys-include -L/mnt/scratch/nightly/2006-05-31/sh-elf/./ld -E -dM - | \ sed -n -e 's/^#define \([^_][a-zA-Z0-9_]*\).*/\1/p' \ -e 's/^#define \(_[^_A-Z][a-zA-Z0-9_]*\).*/\1/p' | \ sort -u > tmp-macro_list /bin/sh ../../srcw/gcc/../move-if-change tmp-macro_list macro_list echo timestamp > s-macro_list The directory that should contain system headers does not exist: /usr/local/sh-elf/sys-include make[1]: *** [stmp-fixinc] Error 1 make[1]: Leaving directory `/mnt/scratch/nightly/2006-05-31/sh-elf/gcc' make: *** [all-gcc] Error 2
--with-headers with a combined build is not really a good thing.
(In reply to comment #1) > --with-headers with a combined build is not really a good thing. > --with-headers is required for cross compilers in order to build a working libgcov. A working libgcov is required for profiling and profile-directed optimizations, and hence for a successfull regression test.
Subject: Bug 27850 Author: amylaar Date: Fri Jun 2 23:50:11 2006 New Revision: 114332 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114332 Log: PR other/27850 * Makefile.in (stmp-fixinc): Fix typo. Modified: trunk/gcc/ChangeLog trunk/gcc/Makefile.in
Fixed with patch from Jun 2 23:50:11 2006