Cross building gcc-4.1.0rc2 installs $prefix/include/ssp/unistd.h $prefix/include/ssp/string.h $prefix/include/ssp/ssp.h $prefix/include/ssp/stdio.h i.e. they are being installed into the build-host's include directory. This hardly can be correct.
Confirmed, this is just like PR 25938 for libgomp.
IMO, the cause is clear: The toplevel configure script is broken. Rationale: 1. libssp/* applies a standard automake-based configuration. i.e. includedir is supposed to be pointing to the final $includedir, i.e. libssp/configure.ac expects --includedir=${exec_prefix}/${target_alias}/include for cross compilation The toplevel configure script however (bogusly) passes --includedir=$(includedir) [here /usr/local/include] in TARGET_CONFIGARGS, which causes libssp/configure to receive a bogus includedir. (Check for includedir in $target_alias/libssp/{config.status|Makefile} of a configured build tree) => Adding --includedir=${exec_prefix}/${target_alias}/include to TARGET_CONFIGARGS would be a work-around. But then, ... the next bug hits: 2. The toplevel configure script exports includedir=$(includedir). This bogusly overrides includedir again. To overcome both issues, I am proposing the patch in the attachment. ATM, this patch is tested with --languages=c --target=sparc-rtems4.7, only, but I'd expect this patch also to resolve the mudflap rsp. gomp headers issues.
Created attachment 10920 [details] Before mentioned patch
Comment on attachment 10920 [details] Before mentioned patch Though I still think GCC's toplevel configure to be bugged and this to be fixing some of then, this patch doesn't solve the problems of this PR. withdrawn
Created attachment 10922 [details] Move ssp headers into $(toolexeclibdir)/include This patch moves libssp's headers to $(toolexeclibdir)/include (..../$version/include), similar to all other GCC internal headers.
Created attachment 10927 [details] Proposed patch
Subject: Bug 26473 Author: mmitchel Date: Tue Feb 28 00:29:00 2006 New Revision: 111500 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111500 Log: PR 26473 * configure.ac (ACX_NONCANONICAL_TARGET): Use it. * Makefile.am (target_noncanonical): Define. (libsubincludedir): New variable. (nobase_libsubinclude_HEADERS): Likewise. (nobase_include_HEADERS): Remove. * configure: Regenerated. * Makefile.in: Likewise. * aclocal.m4: Regenerated. Modified: branches/gcc-4_1-branch/libssp/ChangeLog branches/gcc-4_1-branch/libssp/Makefile.am branches/gcc-4_1-branch/libssp/Makefile.in branches/gcc-4_1-branch/libssp/aclocal.m4 branches/gcc-4_1-branch/libssp/configure branches/gcc-4_1-branch/libssp/configure.ac
Subject: Bug 26473 Author: mmitchel Date: Tue Feb 28 00:41:19 2006 New Revision: 111501 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=111501 Log: PR 26473 * configure.ac (ACX_NONCANONICAL_TARGET): Use it. * Makefile.am (target_noncanonical): Define. (libsubincludedir): New variable. (nobase_libsubinclude_HEADERS): Likewise. (nobase_include_HEADERS): Remove. * configure: Regenerated. * Makefile.in: Likewise. * aclocal.m4: Regenerated. Modified: trunk/libssp/ChangeLog trunk/libssp/Makefile.am trunk/libssp/Makefile.in trunk/libssp/aclocal.m4 trunk/libssp/configure trunk/libssp/configure.ac
Fixed in 4.1.0.
Subject: Bug 26473 Author: fche Date: Wed Jun 21 16:35:27 2006 New Revision: 114855 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114855 Log: 2006-06-21 Frank Ch. Eigler <fche@redhat.com> PR 21274 mf-runtime.h installation based on ssp patch for PR 26473 from Mark Mitchell <mark@codesourcery.com>. * configure.ac (ACX_NONCANONICAL_TARGET): Use it. * Makefile.am (target_noncanonical): Define. (libsubincludedir): New variable. (nobase_libsubinclude_HEADERS): Add mf-runtime.h. (include_HEADERS): Remove. * configure, aclocal.m4, config.h.in: Regenerated. * Makefile.in, testsuite/Makefile.in: Likewise. * mf-runtime.h: Add #ifndef protection for conflicting _REENTRANT and _THREAD_SAFE redefinition values. Modified: trunk/libmudflap/ChangeLog trunk/libmudflap/Makefile.am trunk/libmudflap/Makefile.in trunk/libmudflap/aclocal.m4 trunk/libmudflap/config.h.in trunk/libmudflap/configure trunk/libmudflap/configure.ac trunk/libmudflap/mf-runtime.h trunk/libmudflap/testsuite/Makefile.in