Bug 7088 - host-x-host builds install broken limits.h
Summary: host-x-host builds install broken limits.h
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: other (show other bugs)
Version: 3.1
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2002-06-20 10:16 UTC by Daniel Jacobowitz
Modified: 2023-03-20 22:37 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-07-12 21:46:14


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Jacobowitz 2002-06-20 10:16:02 UTC
If $(LIMITS_H_TEST) is true, then the built <limits.h>
references "syslimits.h".  This test checks
$(SYSTEM_HEADER_DIR), which is /usr/include in a typical
host-x-host build (building a native compiler for a different
target).

Syslimits.h is only installed if fixincludes is run, which
it is not for host-x-host builds; it's explicitly disabled:

# And these apply if build != host.
if test x$build != x$host
then
...
    STMP_FIXINC=
...
fi

$(LIMITS_H_TEST) is a bit bogus anyway.

This is a regression from 2.95, where fixinc was run
regardless, and thus "syslimits.h" was installed.

Release:
3.0, 3.1, HEAD
Comment 1 Dara Hazeghi 2003-05-26 21:16:54 UTC
Daniel,

do you know whether this problem is still present in 3.3 branch/mainline? Thanks,

Dara
Comment 2 Andrew Pinski 2003-05-26 21:18:54 UTC
See Dara's question.
Comment 3 Daniel Jacobowitz 2003-06-02 16:00:34 UTC
The bogus code is still present.  It looks as if it will still be run, also.
I believe the problem is still present.
Comment 4 Dara Hazeghi 2003-06-02 17:29:29 UTC
Confirmed by Daniel.
Comment 5 Nathanael C. Nerode 2003-07-10 00:17:37 UTC
Rrrright.  I'm not quite sure what the correct thing to do is, since we do want to have
the installed limits.h refer to the (target) system limits.h, but I'm planning to clean up limits.h handling, so I'm taking this.
Comment 6 Andrew Pinski 2023-03-20 22:37:13 UTC
This was fully fixed with r13-2319-gbe9dd80f933480 .

Though it was partly fixed with r0-49126-g7a615b25793c22 (for sysroots) and then changed again with r0-63126-gde253ca48a960d and then fixed for building fixincludes for the host by r0-63200-g53c7ffe7dd1c28.


So this was basically fixed for GCC 4.0.0 with only a recent improvement for GCC 13 by allowing --disable-fixincludes .