RFR: 8274329: Fix non-portable HotSpot code in MethodMatcher::parse_method_pattern

Jie Fu jiefu at openjdk.java.net
Tue Sep 28 13:59:37 UTC 2021


On Tue, 28 Sep 2021 13:28:24 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

> 
> There might be another way to change the locale just for the compilation [1], but I haven't had time to test that (so for now I think the official advice is to us `en-us` as a system locale). I think something like this should also remove the warnings (after `reconfigure clean`):
> 
> ```
> diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
> index ba4cb3e9ac7..3078a2e916c 100644
> --- a/make/autoconf/flags-cflags.m4
> +++ b/make/autoconf/flags-cflags.m4
> @@ -496,7 +496,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
>      TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced \
>          -qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
>    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
> -    TOOLCHAIN_CFLAGS_JVM="-nologo -MD -MP"
> +    TOOLCHAIN_CFLAGS_JVM="-nologo -MD -MP -utf-8"
>      TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-"
>    fi
> ```
> 
> In your case the compiler produced some warnings, but I'm wondering if using a different encoding could also silently create subtle behavioral changes. I think it would be good if a specific encoding could be used at build time.
> 

Thanks for your suggestions, @JornVernee .
I tested the above patch, but it still failed.  (rm build -rf; bash configure ..; make images)

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

PR: https://git.openjdk.java.net/jdk/pull/5704


More information about the hotspot-compiler-dev mailing list