On Thu, 12 Sep 2024 22:33:43 GMT, Erik Joelsson <er...@openjdk.org> wrote:
> The autoconf launcher script in the autoconf bundle created by > `make/devkit/createAutoconf.sh` currently writes a config file into the > bundle installation dir every time it runs. This prevents it from functioning > when installed on a read-only filesystem. We can work around the need for > writing to this config file by instead adding a parameter to the command line > sent to the actual autoconf executable. > > This is what the script adds to the config file (with the $this_script_dir > variable expanded): > > begin-language: "M4sugar" > args: --prepend-include $this_script_dir/usr/share/autoconf > end-language: "M4sugar" > > Looking at the original config file, it has several lines similar to this > where the --prepend-include arg points to $PREFIX/usr/share/autoconf (where > $PREFIX was specified at autoconf build time). Removing this addition from > the config file causes autoconf to fail as it can't find m4sugar.m4 (which is > located in $this_script_dir/usr/share/autoconf). > > My proposed workaround, is to just add `--prepend-include > $this_script_dir/usr/share/autoconf` as a command line option to the real > autoconf script, which we call from the wrapper script. This would have the > benefit of also fixing the other instances of this that are present in the > config file, but that we aren't using in our configure script. > > In addition to this, I made the script conform better to the current standard > for these bundle creation scripts. The output should end up in a sub > directory of `build`. No temp dirs should be used instead of the build dir. I > also added some automation for setting the target platform tuple based on > `uname` for the most common platforms, and added the ability to override for > any others, without having to edit the file. Marked as reviewed by mikael (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/20978#pullrequestreview-2303741685