diff mbox series

regenerate-opt-urls.py: fix transposed values for "vax" and "v850"

Message ID 20240528154125.3770757-1-dmalcolm@redhat.com
State New
Headers show
Series regenerate-opt-urls.py: fix transposed values for "vax" and "v850" | expand

Commit Message

David Malcolm May 28, 2024, 3:41 p.m. UTC
> On Tue, 2024-05-28 at 15:03 +0200, Mark Wielaard wrote:
> Hi Maciej (Hi David, added to CC),

>On Mon, 2024-05-27 at 05:19 +0100, Maciej W. Rozycki wrote:
> >  As reported in PR target/79646 and fixed by a change proposed by
> > Abe we 
> > have a couple of issues with the descriptions of the VAX
> > floating-point 
> > format options in the option definition file.  Additionally most of
> > these 
> > options are not documented in the manual.
> > 
> >  This mini patch series addresses these issues, including Abe's
> > change, 
> > slightly updated, and my new change.  See individual change
> > descriptions 
> > for details.
> > 
> >  Verified by inspecting output produced by `vax-netbsdelf-gcc -v
> > --help' 
> > and by eyeballing `gcc.info' and `gcc.pdf' files produced. 
> > Committed.
>
> This broke the gcc-autoregen checker because the
> gcc/config/vax/vax.opt.urls file wasn't regenerated:
> https://builder.sourceware.org/buildbot/#/builders/269/builds/5347
> 
> Producing the following diff:
> 
> diff --git a/gcc/config/vax/vax.opt.urls
> b/gcc/config/vax/vax.opt.urls
> index c6b1c418b61..ca78b31dd4c 100644
> --- a/gcc/config/vax/vax.opt.urls
> +++ b/gcc/config/vax/vax.opt.urls
> @@ -1,7 +1,13 @@
>  ; Autogenerated by regenerate-opt-urls.py from
> gcc/config/vax/vax.opt and generated HTML
>  
> +; skipping UrlSuffix for 'md' due to finding no URLs
> +
> +; skipping UrlSuffix for 'md-float' due to finding no URLs
> +
>  ; skipping UrlSuffix for 'mg' due to finding no URLs
>  
> +; skipping UrlSuffix for 'mg-float' due to finding no URLs
> +
>  ; skipping UrlSuffix for 'mgnu' due to finding no URLs
>  
>  ; skipping UrlSuffix for 'munix' due to finding no URLs
> 
> I am not completely clear on why though. Since it seems you actually
> did add documentation for exactly these options.
> 
> David, should the above diff just be checked in, or do we need to
> investigate why the URLs weren't found?

[adding Nick, re the v850 target]

I found the problem - I messed up when I was populating
TARGET_SPECIFIC_PAGES in regenerate-opt-urls.py, accidentally
transposing the entries for v850 and vax by writing:

    'gcc/V850-Options.html' : 'gcc/config/vax/',
    'gcc/VAX-Options.html' : 'gcc/config/v850/',

leading to both gcc/config/v850/v850.opt.urls and
gcc/config/vax/vax.opt.urls being full of such comments.

Sorry.

Fixing that leads to the files for both targets being populated with
correct-looking URL entries.

I'll push this to trunk (and backport to gcc 14) after suitable testing.

Dave

gcc/ChangeLog:
	* config/v850/v850.opt.urls: Regenerate, with fix.
	* config/vax/vax.opt.urls: Likewise.
	* regenerate-opt-urls.py (TARGET_SPECIFIC_PAGES): Fix transposed
	values for "vax" and "v850".

Signed-off-by: David Malcolm <dmalcolm@redhat.com>
---
 gcc/config/v850/v850.opt.urls | 81 +++++++++++++++++++++++------------
 gcc/config/vax/vax.opt.urls   | 21 +++++++--
 gcc/regenerate-opt-urls.py    |  4 +-
 3 files changed, 73 insertions(+), 33 deletions(-)

Comments

David Malcolm May 28, 2024, 7:52 p.m. UTC | #1
On Tue, 2024-05-28 at 11:41 -0400, David Malcolm wrote:
> > On Tue, 2024-05-28 at 15:03 +0200, Mark Wielaard wrote:
> > Hi Maciej (Hi David, added to CC),
> 
> > On Mon, 2024-05-27 at 05:19 +0100, Maciej W. Rozycki wrote:
> > >  As reported in PR target/79646 and fixed by a change proposed by
> > > Abe we 
> > > have a couple of issues with the descriptions of the VAX
> > > floating-point 
> > > format options in the option definition file.  Additionally most
> > > of
> > > these 
> > > options are not documented in the manual.
> > > 
> > >  This mini patch series addresses these issues, including Abe's
> > > change, 
> > > slightly updated, and my new change.  See individual change
> > > descriptions 
> > > for details.
> > > 
> > >  Verified by inspecting output produced by `vax-netbsdelf-gcc -v
> > > --help' 
> > > and by eyeballing `gcc.info' and `gcc.pdf' files produced. 
> > > Committed.
> > 
> > This broke the gcc-autoregen checker because the
> > gcc/config/vax/vax.opt.urls file wasn't regenerated:
> > https://builder.sourceware.org/buildbot/#/builders/269/builds/5347
> > 
> > Producing the following diff:
> > 
> > diff --git a/gcc/config/vax/vax.opt.urls
> > b/gcc/config/vax/vax.opt.urls
> > index c6b1c418b61..ca78b31dd4c 100644
> > --- a/gcc/config/vax/vax.opt.urls
> > +++ b/gcc/config/vax/vax.opt.urls
> > @@ -1,7 +1,13 @@
> >  ; Autogenerated by regenerate-opt-urls.py from
> > gcc/config/vax/vax.opt and generated HTML
> >  
> > +; skipping UrlSuffix for 'md' due to finding no URLs
> > +
> > +; skipping UrlSuffix for 'md-float' due to finding no URLs
> > +
> >  ; skipping UrlSuffix for 'mg' due to finding no URLs
> >  
> > +; skipping UrlSuffix for 'mg-float' due to finding no URLs
> > +
> >  ; skipping UrlSuffix for 'mgnu' due to finding no URLs
> >  
> >  ; skipping UrlSuffix for 'munix' due to finding no URLs
> > 
> > I am not completely clear on why though. Since it seems you
> > actually
> > did add documentation for exactly these options.
> > 
> > David, should the above diff just be checked in, or do we need to
> > investigate why the URLs weren't found?
> 
> [adding Nick, re the v850 target]
> 
> I found the problem - I messed up when I was populating
> TARGET_SPECIFIC_PAGES in regenerate-opt-urls.py, accidentally
> transposing the entries for v850 and vax by writing:
> 
>     'gcc/V850-Options.html' : 'gcc/config/vax/',
>     'gcc/VAX-Options.html' : 'gcc/config/v850/',
> 
> leading to both gcc/config/v850/v850.opt.urls and
> gcc/config/vax/vax.opt.urls being full of such comments.
> 
> Sorry.
> 
> Fixing that leads to the files for both targets being populated with
> correct-looking URL entries.
> 
> I'll push this to trunk (and backport to gcc 14) after suitable
> testing.

I've pushed this to gcc trunk as r15-872-g7cc529fe514cc6 (having
bootstrapped and lightly tested it on x86_64-pc-linux-gnu)

Dave
Maciej W. Rozycki June 3, 2024, 10:30 a.m. UTC | #2
On Tue, 28 May 2024, David Malcolm wrote:

> I've pushed this to gcc trunk as r15-872-g7cc529fe514cc6 (having
> bootstrapped and lightly tested it on x86_64-pc-linux-gnu)

 Thank you for fixing this up.  Is this a new requirement now for .opt 
file changes?  Why does it have to be called by hand then rather than 
being a make dependency?

  Maciej
David Malcolm June 3, 2024, 3:02 p.m. UTC | #3
On Mon, 2024-06-03 at 11:30 +0100, Maciej W. Rozycki wrote:
> On Tue, 28 May 2024, David Malcolm wrote:
> 
> > I've pushed this to gcc trunk as r15-872-g7cc529fe514cc6 (having
> > bootstrapped and lightly tested it on x86_64-pc-linux-gnu)
> 
>  Thank you for fixing this up.  Is this a new requirement now for
> .opt 
> file changes?  

Yes, as of GCC 14.

I posted the objectives here:
https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636060.html

> Why does it have to be called by hand then rather than
> being a make dependency?

IIRC, the idea is:
(a) to avoid requiring Python 3 as a build dependency, and 
(b) to avoid requiring the HTML docs to be built before gcc's code can
be built

since missing a few URLs is a relatively minor issue that we don't want
to complicate the build for.

Hence we decided to check for it in CI instead.

Hope the trade-off sounds reasonable
Dave
Maciej W. Rozycki June 12, 2024, 2:21 p.m. UTC | #4
On Mon, 3 Jun 2024, David Malcolm wrote:

> >  Thank you for fixing this up.  Is this a new requirement now for
> > .opt 
> > file changes?  
> 
> Yes, as of GCC 14.
> 
> I posted the objectives here:
> https://gcc.gnu.org/pipermail/gcc-patches/2023-November/636060.html

 Thank you for the pointer.

> > Why does it have to be called by hand then rather than
> > being a make dependency?
> 
> IIRC, the idea is:
> (a) to avoid requiring Python 3 as a build dependency, and 
> (b) to avoid requiring the HTML docs to be built before gcc's code can
> be built
> 
> since missing a few URLs is a relatively minor issue that we don't want
> to complicate the build for.

 Understood.  My overall experience with Python over the years has been 
very bad, with things breaking randomly depending on the phase of the 
moon, the tide, etc., so I think avoiding it as a build dependency in the 
field is a good idea.

> Hence we decided to check for it in CI instead.
> 
> Hope the trade-off sounds reasonable

 I have reviewed the thread referred and I note that a concern such as 
mine has already been raised in response to which you have added the 
`regenerate-opt-urls' make target (thanks!).

 I think it's a good direction given the circumstances, but I also think a 
more generic make target such as `generated-sources' or suchlike would be 
good having as an umbrella for any future additions we may make, and as 
one that might be easier to remember.  Perhaps it could be a dependency 
for `all' even, in the maintainer mode (which I confess to be guilty of 
not regularly using though), along with any autoconf stuff, etc.

  Maciej
diff mbox series

Patch

diff --git a/gcc/config/v850/v850.opt.urls b/gcc/config/v850/v850.opt.urls
index dc5a83107b3..a06f4833f47 100644
--- a/gcc/config/v850/v850.opt.urls
+++ b/gcc/config/v850/v850.opt.urls
@@ -1,60 +1,87 @@ 
 ; Autogenerated by regenerate-opt-urls.py from gcc/config/v850/v850.opt and generated HTML
 
-; skipping UrlSuffix for 'mapp-regs' due to finding no URLs
+mapp-regs
+UrlSuffix(gcc/V850-Options.html#index-mapp-regs-1)
 
-; skipping UrlSuffix for 'mbig-switch' due to finding no URLs
+mbig-switch
+UrlSuffix(gcc/V850-Options.html#index-mbig-switch-1)
 
 ; skipping UrlSuffix for 'mdebug' due to finding no URLs
 
-; skipping UrlSuffix for 'mdisable-callt' due to finding no URLs
+mdisable-callt
+UrlSuffix(gcc/V850-Options.html#index-mdisable-callt)
 
-; skipping UrlSuffix for 'mep' due to finding no URLs
+mep
+UrlSuffix(gcc/V850-Options.html#index-mep)
 
-; skipping UrlSuffix for 'mghs' due to finding no URLs
+mghs
+UrlSuffix(gcc/V850-Options.html#index-mghs)
 
-; skipping UrlSuffix for 'mlong-calls' due to finding no URLs
+mlong-calls
+UrlSuffix(gcc/V850-Options.html#index-mlong-calls-7)
 
-; skipping UrlSuffix for 'mprolog-function' due to finding no URLs
+mprolog-function
+UrlSuffix(gcc/V850-Options.html#index-mprolog-function)
 
-; skipping UrlSuffix for 'msda=' due to finding no URLs
+msda=
+UrlSuffix(gcc/V850-Options.html#index-msda)
 
-; skipping UrlSuffix for 'mspace' due to finding no URLs
+mspace
+UrlSuffix(gcc/V850-Options.html#index-mspace)
 
-; skipping UrlSuffix for 'mtda=' due to finding no URLs
+mtda=
+UrlSuffix(gcc/V850-Options.html#index-mtda)
 
 ; skipping UrlSuffix for 'mno-strict-align' due to finding no URLs
 
-; skipping UrlSuffix for 'mv850' due to finding no URLs
+mv850
+UrlSuffix(gcc/V850-Options.html#index-mv850)
 
-; skipping UrlSuffix for 'mv850e' due to finding no URLs
+mv850e
+UrlSuffix(gcc/V850-Options.html#index-mv850e)
 
-; skipping UrlSuffix for 'mv850e1' due to finding no URLs
+mv850e1
+UrlSuffix(gcc/V850-Options.html#index-mv850e1)
 
-; skipping UrlSuffix for 'mv850es' due to finding no URLs
+mv850es
+UrlSuffix(gcc/V850-Options.html#index-mv850es)
 
-; skipping UrlSuffix for 'mv850e2' due to finding no URLs
+mv850e2
+UrlSuffix(gcc/V850-Options.html#index-mv850e2)
 
-; skipping UrlSuffix for 'mv850e2v3' due to finding no URLs
+mv850e2v3
+UrlSuffix(gcc/V850-Options.html#index-mv850e2v3)
 
-; skipping UrlSuffix for 'mv850e3v5' due to finding no URLs
+mv850e3v5
+UrlSuffix(gcc/V850-Options.html#index-mv850e3v5)
 
-; skipping UrlSuffix for 'mv850e2v4' due to finding no URLs
+mv850e2v4
+UrlSuffix(gcc/V850-Options.html#index-mv850e2v4)
 
-; skipping UrlSuffix for 'mloop' due to finding no URLs
+mloop
+UrlSuffix(gcc/V850-Options.html#index-mloop-1)
 
-; skipping UrlSuffix for 'mzda=' due to finding no URLs
+mzda=
+UrlSuffix(gcc/V850-Options.html#index-mzda)
 
-; skipping UrlSuffix for 'mrelax' due to finding no URLs
+mrelax
+UrlSuffix(gcc/V850-Options.html#index-mrelax-9)
 
-; skipping UrlSuffix for 'mlong-jumps' due to finding no URLs
+mlong-jumps
+UrlSuffix(gcc/V850-Options.html#index-mlong-jumps)
 
-; skipping UrlSuffix for 'msoft-float' due to finding no URLs
+msoft-float
+UrlSuffix(gcc/V850-Options.html#index-msoft-float-14)
 
-; skipping UrlSuffix for 'mhard-float' due to finding no URLs
+mhard-float
+UrlSuffix(gcc/V850-Options.html#index-mhard-float-9)
 
-; skipping UrlSuffix for 'mrh850-abi' due to finding no URLs
+mrh850-abi
+UrlSuffix(gcc/V850-Options.html#index-mrh850-abi)
 
-; skipping UrlSuffix for 'mgcc-abi' due to finding no URLs
+mgcc-abi
+UrlSuffix(gcc/V850-Options.html#index-mgcc-abi)
 
-; skipping UrlSuffix for 'm8byte-align' due to finding no URLs
+m8byte-align
+UrlSuffix(gcc/V850-Options.html#index-m8byte-align)
 
diff --git a/gcc/config/vax/vax.opt.urls b/gcc/config/vax/vax.opt.urls
index c6b1c418b61..10bee25d833 100644
--- a/gcc/config/vax/vax.opt.urls
+++ b/gcc/config/vax/vax.opt.urls
@@ -1,10 +1,23 @@ 
 ; Autogenerated by regenerate-opt-urls.py from gcc/config/vax/vax.opt and generated HTML
 
-; skipping UrlSuffix for 'mg' due to finding no URLs
+md
+UrlSuffix(gcc/VAX-Options.html#index-md)
 
-; skipping UrlSuffix for 'mgnu' due to finding no URLs
+md-float
+UrlSuffix(gcc/VAX-Options.html#index-md-float)
 
-; skipping UrlSuffix for 'munix' due to finding no URLs
+mg
+UrlSuffix(gcc/VAX-Options.html#index-mg)
 
-; skipping UrlSuffix for 'mlra' due to finding no URLs
+mg-float
+UrlSuffix(gcc/VAX-Options.html#index-mg-float)
+
+mgnu
+UrlSuffix(gcc/VAX-Options.html#index-mgnu)
+
+munix
+UrlSuffix(gcc/VAX-Options.html#index-munix)
+
+mlra
+UrlSuffix(gcc/VAX-Options.html#index-mlra-4)
 
diff --git a/gcc/regenerate-opt-urls.py b/gcc/regenerate-opt-urls.py
index 50f1fa04bc9..666993ea0b9 100755
--- a/gcc/regenerate-opt-urls.py
+++ b/gcc/regenerate-opt-urls.py
@@ -260,8 +260,8 @@  TARGET_SPECIFIC_PAGES = {
     'gcc/SH-Options.html' : 'gcc/config/sh/',
     'gcc/SPARC-Options.html' : 'gcc/config/sparc/',
     'gcc/S_002f390-and-zSeries-Options.html' : 'gcc/config/s390',
-    'gcc/V850-Options.html' : 'gcc/config/vax/',
-    'gcc/VAX-Options.html' : 'gcc/config/v850/',
+    'gcc/V850-Options.html' : 'gcc/config/v850/',
+    'gcc/VAX-Options.html' : 'gcc/config/vax/',
     'gcc/Visium-Options.html' : 'gcc/config/visium/',
     'gcc/Xstormy16-Options.html' : 'gcc/config/stormy16/',
     'gcc/Xtensa-Options.html' : 'gcc/config/xtensa/',