Wno-error=format-overflow needed onnewer gccs
Jiri Vanek
jvanek at redhat.com
Wed Jun 23 11:38:59 UTC 2021
Ping please?
On 6/22/21 3:56 PM, Jiri Vanek wrote:
> Hello!
>
> For pretty long tim, on newer gcc default build fails as:
>
> Compiling /home/jvanek/hg/jdk8u-dev/hotspot/src/share/vm/opto/parse3.cpp
> /home/jvanek/hg/jdk8u-dev/hotspot/src/os/linux/vm/os_linux.cpp: In static member function ‘static void os::Linux::check_signal_handler(int)’:
> /home/jvanek/hg/jdk8u-dev/hotspot/src/os/linux/vm/os_linux.cpp:4999:15: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
> 4999 | tty->print("Warning: %s handler ", exception_name(sig, buf, O_BUFLEN));
> | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Compiling /home/jvanek/hg/jdk8u-dev/hotspot/src/share/vm/opto/parseHelper.cpp
> cc1plus: all warnings being treated as errors
> gmake[6]: *** [/home/jvanek/hg/jdk8u-dev/hotspot/make/linux/makefiles/rules.make:151: os_linux.o] Error 1
>
>
> You need to build as
> make WARNINGS_ARE_ERRORS="-Wno-error=format-overflow"
>
>
> to make it works. I'm unabel to decide if the warning is valid. If it is, can you please fix it?
> If not, I can make webrev and adding it to default set of hotspot's excluded warnings.
>
> J.
>
>
> If somebody is sitting on it right now, feel free to push on you own :)
>
>
> the above exclusion is making the jdk to build:
>
> make WARNINGS_ARE_ERRORS="-Wno-error=format-overflow"
> ...
>
>
> ----- Build times -------
> Start 2021-06-22 15:49:22
> End 2021-06-22 15:51:05
> 00:00:00 corba
> 00:00:00 hotspot
> 00:00:00 jaxp
> 00:00:00 jaxws
> 00:01:43 jdk
> 00:00:00 langtools
> 00:01:43 TOTAL
> -------------------------
> Finished building OpenJDK for target 'default'
>
>
>
--
Jiri Vanek Mgr.
Principal QA Software Engineer
Red Hat Inc.
+420 775 39 01 09
More information about the jdk8u-dev
mailing list