From 4c8c9935eb23bfbabf311ad2e27498227f4ee932 Mon Sep 17 00:00:00 2001 From: Tyler Steele Date: Mon, 20 Mar 2023 17:13:35 +0000 Subject: [PATCH] 8304364: [AIX] Build erroneously determines build disk is non-local when using GNU-utils df on AIX Reviewed-by: erikj --- make/autoconf/basic.m4 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/make/autoconf/basic.m4 b/make/autoconf/basic.m4 index 7e8c7bb8bed..2ec792f78b4 100644 --- a/make/autoconf/basic.m4 +++ b/make/autoconf/basic.m4 @@ -477,7 +477,11 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK], # df on AIX does not understand -l. On modern AIXes it understands "-T local" which # is the same. On older AIXes we just continue to live with a "not local build" warning. if test "x$OPENJDK_TARGET_OS" = xaix; then - DF_LOCAL_ONLY_OPTION='-T local' + if "$DF -T local > /dev/null 2>&1"; then + DF_LOCAL_ONLY_OPTION='-T local' + else # AIX may use GNU-utils instead + DF_LOCAL_ONLY_OPTION='-l' + fi elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl1"; then # In WSL1, we can only build on a drvfs file system (that is, a mounted real Windows drive) DF_LOCAL_ONLY_OPTION='-t drvfs'