Bug 27850 - gcov-enabled sh-elf compiler fails to build
Summary: gcov-enabled sh-elf compiler fails to build
Status: RESOLVED FIXED
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
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2006-05-31 22:16 UTC by Jorn Wolfgang Rennecke
Modified: 2006-11-15 16:16 UTC (History)
1 user (show)

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


Attachments

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:
  /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
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
Log:
	PR other/27850
	* Makefile.in (stmp-fixinc): Fix typo.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in

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