Bug 26473 - [4.1/4.2 Regression] cross-building installs ssp headers to $(includedir)
Summary: [4.1/4.2 Regression] cross-building installs ssp headers to $(includedir)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 4.1.0
: P3 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks: 346
  Show dependency treegraph
 
Reported: 2006-02-26 12:25 UTC by Ralf Corsepius
Modified: 2006-02-28 01:10 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-02-26 14:48:34


Attachments
Before mentioned patch (528 bytes, patch)
2006-02-27 14:12 UTC, Ralf Corsepius
Details | Diff
Move ssp headers into $(toolexeclibdir)/include (1.51 KB, patch)
2006-02-27 17:48 UTC, Ralf Corsepius
Details | Diff
Proposed patch (624 bytes, patch)
2006-02-27 22:29 UTC, Mark Mitchell
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Corsepius 2006-02-26 12:25:31 UTC
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.
Comment 1 Andrew Pinski 2006-02-26 14:48:34 UTC
Confirmed, this is just like PR 25938 for libgomp.
Comment 2 Ralf Corsepius 2006-02-27 14:11:17 UTC
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.
Comment 3 Ralf Corsepius 2006-02-27 14:12:53 UTC
Created attachment 10920 [details]
Before mentioned patch
Comment 4 Ralf Corsepius 2006-02-27 17:44:34 UTC
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
Comment 5 Ralf Corsepius 2006-02-27 17:48:07 UTC
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.
Comment 6 Mark Mitchell 2006-02-27 22:29:05 UTC
Created attachment 10927 [details]
Proposed patch
Comment 7 Mark Mitchell 2006-02-28 00:29:05 UTC
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

Comment 8 Mark Mitchell 2006-02-28 00:41:22 UTC
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

Comment 9 Mark Mitchell 2006-02-28 01:10:41 UTC
Fixed in 4.1.0.
Comment 10 Frank Ch. Eigler 2006-06-21 16:35:55 UTC
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