mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-28 19:54:35 +00:00
packaging: configure QEMU with -O2
Currently the the configure-hypervisor.sh doesn't set any optimization flag when compiling QEMU >= 5.2.0 since the configure script will implicitly set -O2 on Ubuntu. But on other environments, for example CentOS 7, it won't be set any optimization and this results on the compiler warn: # warning _FORTIFY_SOURCE requires compiling with optimization (-O) To avoid this inconsistent behavior across different build environments, let's explicitly set the -O2 flag. Reported-by: Eric Ernst <eric.g.ernst@gmail.com> Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
This commit is contained in:
parent
224c50f420
commit
0f7950fb2a
@ -474,6 +474,8 @@ generate_qemu_options() {
|
||||
# On version 5.2.0 onward the Meson build system warns to not use -O3
|
||||
if ! gt_eq "${qemu_version}" "5.2.0" ; then
|
||||
_qemu_cflags+=" -O3"
|
||||
else
|
||||
_qemu_cflags+=" -O2"
|
||||
fi
|
||||
|
||||
# Improve code quality by assuming identical semantics for interposed
|
||||
|
Loading…
Reference in New Issue
Block a user