summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2022-03-29 18:12:28 +0800
committerSimon Horman <horms@verge.net.au>2022-03-30 11:04:59 +0200
commit1b03cf7adc3c156ecab2618acb1ec585336a3f75 (patch)
treebf57066752638705e100d583a0ae9d52148bde95
parentdcfcc73c73e6c739b6809f5249ac23c788faf2c7 (diff)
downloadkexec-tools-1b03cf7adc3c156ecab2618acb1ec585336a3f75.tar.gz
purgatory: do not enable vectorization automatically for purgatory compiling
Redhat CKI reported kdump kernel will hang a while very early after crash triggered, then reset to firmware to reboot. This failure can only be observed with kdump or kexec reboot via kexec_load system call. With kexec_file_load interface, both kdump and kexec reboot work very well. And further investigation shows that gcc version 11 doesn't have this issue, while gcc version 12 does. After checking the release notes of the latest gcc, Dave found out it's because gcc 12 enables auto-vectorization for -O2 optimization level. Please see below link for more information: https://www.phoronix.com/scan.php?page=news_item&px=GCC-12-Auto-Vec-O2 Adding -fno-tree-vectorize to Makefile of purgatory can fix the issue. Signed-off-by: Baoquan He <bhe@redhat.com> Signed-off-by: Simon Horman <horms@verge.net.au>
-rw-r--r--purgatory/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/purgatory/Makefile b/purgatory/Makefile
index 2dd6c47..15adb12 100644
--- a/purgatory/Makefile
+++ b/purgatory/Makefile
@@ -49,7 +49,7 @@ $(PURGATORY): CFLAGS=$(PURGATORY_EXTRA_CFLAGS) \
$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
-Os -fno-builtin -ffreestanding \
-fno-zero-initialized-in-bss \
- -fno-PIC -fno-PIE -fno-stack-protector
+ -fno-PIC -fno-PIE -fno-stack-protector -fno-tree-vectorize
$(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \
-I$(srcdir)/purgatory/include \