Bug 27850 - gcov-enabled sh-elf compiler fails to build
Summary: gcov-enabled sh-elf compiler fails to build
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Keywords: build
Depends on:
Reported: 2006-05-31 22:16 UTC by Jorn Wolfgang Rennecke
Modified: 2006-11-15 16:16 UTC (History)
1 user (show)

See Also:
Target: sh-elf
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Jorn Wolfgang Rennecke 2006-05-31 22:16:56 UTC
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:
make[1]: *** [stmp-fixinc] Error 1
make[1]: Leaving directory `/mnt/scratch/nightly/2006-05-31/sh-elf/gcc'
make: *** [all-gcc] Error 2
Comment 1 Andrew Pinski 2006-06-01 04:53:48 UTC
--with-headers with a combined build is not really a good thing.
Comment 2 Jorn Wolfgang Rennecke 2006-06-01 15:23:17 UTC
(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.
Comment 3 Jorn Wolfgang Rennecke 2006-06-02 23:50:18 UTC
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
	PR other/27850
	* Makefile.in (stmp-fixinc): Fix typo.


Comment 4 Jorn Wolfgang Rennecke 2006-11-15 16:16:42 UTC
Fixed with patch from Jun  2 23:50:11 2006