On Thu, 11 Jan 2024 11:06:02 GMT, Christoph Langer <clan...@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


Thanks , seems GREP was indeed 'harmed' by the parameters we use here.
Btw there is a similar place here where we would run into the same issue
https://github.com/openjdk/jdk/blob/b922f8d45951250b7c39cb179b9bc1a8a6256a9e/make/autoconf/util.m4#L229
should I adjust this too ?

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17301#issuecomment-1887131296

Reply via email to