On 8/30/22 17:36, Gaius Mulley wrote: > Martin Liška <mli...@suse.cz> writes: > >> On 8/30/22 13:03, Gaius Mulley via Gcc-patches wrote: >>> >>> Another very brief update to say that I'm now tidying up the code and >>> primary platform testing >>> >>> regards, >>> Gaius >> >> Hello. >> >> As you may know I'm working on the documentation migration from texinfo to >> Sphinx >> and I noticed you have quite some documentation written in Texinfo. Thus, I >> tried >> using my conversion script, but ended with: >> >> $ m2/boot-bin/mc --olang=c++ --h-file-prefix=G >> -I/home/marxin/Programming/gcc2/gcc/m2/gm2-libs >> -I/home/marxin/Programming/gcc2/gcc/m2/gm2-compiler >> -I/home/marxin/Programming/gcc2/gcc/m2/gm2-libiberty >> -I/home/marxin/Programming/gcc2/gcc/m2/gm2-gcc --quiet >> --gcc-config-system --extended-opaque >> -o=m2/gm2-compiler-boot/M2GCCDeclare.c >> /home/marxin/Programming/gcc2/gcc/m2/gm2-compiler/M2GCCDeclare.mod >> /* --extended-opaque seen therefore no #include will be used and everything >> will be declared in full. */ >> terminate called after throwing an instance of 'unsigned int' >> Aborted (core dumped) >> >> $ Program received signal SIGSEGV, Segmentation fault. >> 0x000000000043771e in decl_isConst (n=0xbabababababababa) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:22530 >> 22530 return n->kind == const_; >> (gdb) bt >> #0 0x000000000043771e in decl_isConst (n=0xbabababababababa) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:22530 >> #1 0x0000000000432526 in addEnumConst (n=0xbabababababababa) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:19914 >> #2 0x00000000004313aa in visitNode (v=0x17cd5910, n=0xbabababababababa, >> p=...) at /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:19240 >> #3 0x0000000000430ba9 in visitIntrinsic (v=0x17cd5910, n=0x5015c0, p=...) >> at /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:18871 >> #4 0x0000000000430cc6 in visitDependants (v=0x17cd5910, n=0x5015c0, p=...) >> at /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:18923 >> #5 0x00000000004313c1 in visitNode (v=0x17cd5910, n=0x5015c0, p=...) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:19241 >> #6 0x00000000004325b8 in populateTodo (p=...) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:19938 >> #7 0x0000000000432613 in topologicallyOut (c=..., t=..., v=..., tp=..., >> pc=..., pt=..., pv=...) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:19957 >> #8 0x0000000000426ffb in outDeclsImpC (p=0x17cc39a0, s=...) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:13910 >> #9 0x0000000000432f2f in outImpC (p=0x17cc39a0, n=0x541800) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:20142 >> #10 0x00000000004337b5 in outC (p=0x17cc39a0, n=0x541800) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:20285 >> #11 0x000000000043bd9b in decl_out () at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gdecl.c:26621 >> #12 0x000000000043eae6 in doCompile (s=0x50a190) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/GmcComp.c:223 >> #13 0x000000000043f646 in mcComp_compile (s=0x50a190) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/GmcComp.c:637 >> #14 0x0000000000451d91 in init () at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gtop.c:59 >> #15 0x0000000000451da8 in _M2_top_init (argc=12, argv=0x7fffffffd9a8) at >> /home/marxin/Programming/gcc2/gcc/m2/mc-boot/Gtop.c:64 >> #16 0x000000000048b4c2 in main (argc=12, argv=0x7fffffffd9a8) at >> m2/mc-boot/main.c:179 > > Hi Martin, > > ah interesting - thanks for the trace will look into the above fault.
Hello. Thanks. > >> Have a couple of questions: >> >> 1) What's gcc/m2/www/tools/createhtml.py about? Will you need it once >> the branch is merged to master? > > no it will be purged. It was part of the tool set used to generate > https://www.nongnu.org/gm2/homepage.html from gm2.texi. createhtml > allowed gcc-10, 11, 12 documentation to coexist. > > I've seen and like the demos of the documentation you are producing. > I was curious is there provision for older gcc release documentation > (say gcc-10 onwards) to be accessible via the Sphinx’s documentation? No, only for the current master branch. > >> 2) You generate some texi files on fly: ./gcc/m2/gm2-ebnf.texi, >> ./gcc/m2/Builtins.texi >> Would it be possible emitting Sphinx in the future? > > yes sure - I was meaning to email about this earlier. Are there any > do/don'ts you would advise when writing texinfo (or subset/template > examples?). How do you mean that? You should ideally generate .rst (Sphinx markup) instead of the *.texi files. These will be then included in the converted Sphinx manual similarly to how you include it now to the Texinfo manual. Does it make sense? Cheers, Martin > I'm keen to change the tools which generate gm2-ebnf.texi > and Builtins.texi to accommodate Sphinx. > > regards, > Gaius