Question about macro _GLIBCXX_RES_LIMITS in libstdc++ testsuite

Jim Wilson jim.wilson@linaro.org
Mon May 18 01:40:00 GMT 2015


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



More information about the Gcc mailing list