On Wed, 25 Nov 2026 14:16:56 GMT, Erik Joelsson <[email protected]> wrote:
>>> > The new script uses m4 as well as shell tools like sed and grep directly >>> > from the path, bypassing the lookups done in configure. Is there any risk >>> > that the check would fail if the local version of m4 was different from >>> > the one used to generate the files? It seems m4 tries to stay stable, but >>> > that's not a guarantee. Requiring exact output seems brittle. >>> > For this check to fit into the OpenJDK build, it needs to use tools >>> > defined in configure and only be activated if a suitable m4 version is >>> > detected. >>> >>> Thats a good point. Thx! >> >> I have updated the PR so that the path to m4 is now passed from the build >> system to the script. For the other tools (sed, grep, awk, etc.), I chose >> not to pass them explicitly. They are already discovered by configure. >> >> I'm not entirely sure whether bypassing the configure-provided paths for all >> shell tools would be considered desirable. Passing m4 felt justified since >> output differences between versions could directly affect the generated >> files, whereas the other tools are only used for simple text processing. > >> > > The new script uses m4 as well as shell tools like sed and grep directly >> > > from the path, bypassing the lookups done in configure. Is there any >> > > risk that the check would fail if the local version of m4 was different >> > > from the one used to generate the files? It seems m4 tries to stay >> > > stable, but that's not a guarantee. Requiring exact output seems brittle. >> > > For this check to fit into the OpenJDK build, it needs to use tools >> > > defined in configure and only be activated if a suitable m4 version is >> > > detected. >> > >> > >> > Thats a good point. Thx! >> >> I have updated the PR so that the path to m4 is now passed from the build >> system to the script. For the other tools (sed, grep, awk, etc.), I chose >> not to pass them explicitly. They are already discovered by configure. >> >> I'm not entirely sure whether bypassing the configure-provided paths for all >> shell tools would be considered desirable. Passing m4 felt justified since >> output differences between versions could directly affect the generated >> files, whereas the other tools are only used for simple text processing. > > The current model we use in the build system is that configure discovers and > defines the tools to use during the build. This gives us a predictable set of > tools and consistent usage. As long as we are employing this model, we should > stick with it. If we would want to consider giving up on this model, then > that needs to be an explicit choice. I think what that makes this > inconvenient or awkward in this patch is the fact that the recipe is > extracted into a script instead of being implemented directly in the > makefile, as is usually the norm. > > I noticed another issue. The script is creating a temporary working > directory. We prefer using the build output directory as the working > directory for all build related operations, without deleting files. This > makes debugging build issues easier and fits better with good incremental > build behavior. > > My preferred implementation here would be a set of make rules that performs > the build of these ad files from m4 and then another rule or set that > performs the comparisons. That way make can track this correctly for > incremental builds. Using the tools as defined in configure would be natural. @erikj79 I see your point. I will work on this but not immediately. I will update this PR at some point. Thx for your input! ------------- PR Comment: https://git.openjdk.org/jdk/pull/34019#issuecomment-7186424425
