On Tue, 9 Jan 2024 16:18:08 GMT, Matthias Baesken <mbaes...@openjdk.org> wrote:
> Strange, I noticed that for some reason the > UTIL_GET_NON_MATCHING_VALUES(cxx_filtered, $CXX, -std=c++11 -std=gnu++11) > seems not to remove the flags as expected, did I misinterpret how > UTIL_GET_NON_MATCHING_VALUES works ? Any ideas ? An `CXX=`echo $CXX | cut -d > ' ' -f1`` extracted what we want (not sure if we want to do it that way, in > case we have blanks in the CXX value ? Hi Matthias, I believe that I've figured out the problem with UTIL_GET_NON_MATCHING_VALUES. The string `-std=c++11` is interpreted as an option to GREP. This can be fixed by changing from `$GREP -Fvx "$legal_values" <<< "$values_to_check"` to `$GREP -Fvx -- "$legal_values" <<< "$values_to_check"` in [this place in util.m4](https://github.com/openjdk/jdk/blob/b922f8d45951250b7c39cb179b9bc1a8a6256a9e/make/autoconf/util.m4#L202C5-L202C79). Note the `--` which marks the end of arguments and signals that `$legal_values` is the pattern. I verified that it works. Cheers Christoph ------------- PR Comment: https://git.openjdk.org/jdk/pull/17301#issuecomment-1886889156