Integrated: 8356379: Need a proper way to test existence of binary from configure
Magnus Ihse Bursie
ihse at openjdk.org
Wed May 7 13:26:24 UTC 2025
On Wed, 7 May 2025 10:57:27 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
> When we setup a command to run, e.g. $FOO we typically set this to just a path to a binary, e.g. /usr/bin/foo. However, this is not necessarily true. On Windows, this can be prefixed by the $FIXPATH prefix, and on all platforms we are allowed to pass arguments to the executable.
>
> If we want to test if this binary actually exists, we need to extract the binary name from this command line. We have a NOFIXPATH argument to UTIL_LOOKUP_PROGS, which tried to resolve this, but it is not enough, and it makes it impossible to both lookup a program properly and also check for its existance afterwards.
>
> Instead, I propose to add a UTIL_GET_EXECUTABLE function that extracts just the path to the binary from such a command.
This pull request has now been integrated.
Changeset: a72f7506
Author: Magnus Ihse Bursie <ihse at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a72f7506bf07be722c90ed64f5177699d2cebdb2
Stats: 37 lines in 2 files changed: 20 ins; 8 del; 9 mod
8356379: Need a proper way to test existence of binary from configure
Reviewed-by: erikj
-------------
PR: https://git.openjdk.org/jdk/pull/25087
More information about the build-dev
mailing list