This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about macro _GLIBCXX_RES_LIMITS in libstdc++ testsuite
- From: Jim Wilson <jim dot wilson at linaro dot org>
- To: "Bin.Cheng" <amker dot cheng at gmail dot com>, Hans-Peter Nilsson <hp at bitrange dot com>
- Cc: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>
- Date: Sun, 17 May 2015 18:40:37 -0700
- Subject: Re: Question about macro _GLIBCXX_RES_LIMITS in libstdc++ testsuite
- Authentication-results: sourceware.org; auth=none
- References: <CAHFci2_nbpqa2_SkCgAKkWgKouudWz_avyvO6SrYo-sJV5kEOA at mail dot gmail dot com> <alpine dot BSF dot 2 dot 02 dot 1505160529340 dot 55480 at arjuna dot pair dot com> <CAHFci29k9ToujFkRDz_kmhWUKGDg8bcNotWc0zum4ssa2Lritw at mail dot gmail dot com>
On 05/17/2015 01:16 AM, Bin.Cheng wrote:
> On Sat, May 16, 2015 at 5:35 PM, Hans-Peter Nilsson <hp@bitrange.com> wrote:
>> On Thu, 23 Apr 2015, Bin.Cheng wrote:
>>> Hi,
>>> In libstdc++ testsuite, I noticed that macro _GLIBCXX_RES_LIMITS is
>>> checked/set by GLIBCXX_CHECK_SETRLIMIT, which is further guarded by
>>> GLIBCXX_IS_NATIVE as below:
The setrlimit checks were made dependent on GLIBCXX_IS_NATIVE on Aug 9,
2001.
https://gcc.gnu.org/ml/gcc-patches/2001-08/msg00536.html
This is 3 days after the feature was added. This was 14 years ago, so
people might not remember exactly why the change was made. There was
probably no specific reason for this, other than a concern that it might
not work cross, and/or wasn't considered worth the effort to make it
work cross at the time.
It does look like this can work cross, at least for a cross to a linux
target. For a cross to a bare metal target, it should be OK to run the
tests, they will just fail and disable the macros. Someone just needs
write the patches to make it work and test it. You could try submitting
a bug report if you haven't already done so.
Jim