Dear all, please take a look at this tiny fix:
Bug: https://bugs.openjdk.java.net/browse/JDK-8172579 Webrev: http://cr.openjdk.java.net/~stuefe/webrevs/8172579-colon-8168503-broke-AIX-build/webrev/common/autoconf/hotspot.m4.udiff.html JDK-8168503 exposed a bug in AIX grep. AIX grep, when called like this: "grep -Fx <patternlist>" is unable to handle empty patterns correctly. 8168503 added a line break in the definition of a variable: VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \ - graal fprof vm-structs jni-check services management all-gcs nmt cds static-build aot" + graal fprof vm-structs jni-check services management all-gcs nmt cds \ + static-build link-time-opt aot" So now, "cds" is followed by multiple spaces, which are later expanded to multiple newlines, and grep is unable to match the pattern immediately preceding these newlines (in this case, "cds"). This causes the HOTSPOT_VALIDATE_JVM_FEATURES function to fail with "Invalid JVM feature: cds". The error would also happened before when trying to match "jvmci", but so far we do not build jvmci on powerpc. The workaround for now is just to remove the superfluous spaces. I tried for some hours to find a better solution but could not find one which was small enough and worked on all platforms. I tried using sed to change multiple spaces to a single space, but did not get it to work correctly on AIX either. I thought about passing the pattern list as file to grep - which opposed to passing the pattern in the command line works as expected - but refrained from this because creating temporary files is error prone. I attempted to change the whole NEEDLE/STACK expression to a loop checking each single feature with '=~' against the list of valid features, but this felt too intrusive. The proposed fix is not the most elegant one but the risk for other platforms is minimal and it works. Kind Regards, Thomas
