On October 30, 2020, Dominic Hamon <d...@hey.com> wrote: > > On October 29, 2020, Lee Noar <lee.n...@sky.com> wrote: > > On 26/10/2020 13:13, Dominic Hamon wrote: > > > Hello > > > > > > I'm embarking on my first attempt to cross-compile something for > > riscos. > > > I have the environment all set up and figured out how to make the > > > project, but i'm not sure what the appropriate fix is for an > > issue: > > > > > > The project in question (https://github.com/google/benchmark) runs > > a > > > check at build time to see which regex engine is available > > (std::regix, > > > posix regex, or gnu posix regex). It does this by compiling some > > test > > > programs and seeing which succeeds. The issue is that none do for > > riscos > > > (yet). > > > > > > The closest I get is with the posix regex version, which includes > > > `regex.h`. This fails with the error: > > > > > > $ $CXX posix_regex.cpp > > > In file included from posix_regex.cpp:1:0: > > > /home/dominic/gccsdk/cross/lib/gcc/arm-unknown- > > riscos/4.7.4/../../../../arm-unknown-riscos/include/regex.h:56:2: > > > error: 'size_t' does not name a type > > > > > > I believe I could fix this by including <sys/types.h> in the > > crosslib's > > > regex.h (linux does this > > > https://code.woboq.org/linux/include/regex.h.html#23) but is this > > > appropriate? It seems like the right fix to me as regex.h > > shouldn't be > > > using types that haven't been declared. > > > > > > Would this change be acceptable? > > > > It does sound like regex.h should be including sys/types.h. If you > > make > > this change locally in your environment, does the project build? If > > so, > > then I will commit it. >
Would you like me to prepare a patch? > It does, yes. > > There are some other oddities I'm finding in the crosslib headers > around things like definitions of strtoul not being in the std > namespace, but i wonder if that's related to it not fully supporting > C++11? > > > Thanks, > > Lee. > > > > _______________________________________________ > > GCCSDK mailing list gcc@gccsdk.riscos.info > > Bugzilla: http://www.riscos.info/bugzilla/index.cgi > > List Info: http://www.riscos.info/mailman/listinfo/gcc > > Main Page: http://www.riscos.info/index.php/GCCSDK >
_______________________________________________ GCCSDK mailing list gcc@gccsdk.riscos.info Bugzilla: http://www.riscos.info/bugzilla/index.cgi List Info: http://www.riscos.info/mailman/listinfo/gcc Main Page: http://www.riscos.info/index.php/GCCSDK