From 919a3299ee02c55763866f49f4cfed295b1e4ce6 Mon Sep 17 00:00:00 2001 From: Dave Young Date: Fri, 8 Dec 2017 11:39:09 +0800 Subject: [PATCH] Workaround a koji build failure with below CFLAGS, kexec-tools can not build: --specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 segfault happened while strip the purgatory: gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fno-strict-aliasing -Wall -Wstrict-prototypes -fno-zero-initialized-in-bss -mcmodel=large -Os -fno-builtin -ffreestanding -fno-zero-initialized-in-bss -fno-PIC -fno-PIE -fno-stack-protector -mcmodel=large -Wl,--no-undefined -nostartfiles -nostdlib -nodefaultlibs -e purgatory_start -r -Wl,-Map=purgatory/purgatory.map -o purgatory/purgatory.ro.sym purgatory/purgatory.o purgatory/printf.o purgatory/string.o purgatory/arch/x86_64/entry64-32.o purgatory/arch/x86_64/entry64.o purgatory/arch/x86_64/setup-x86_64.o purgatory/arch/x86_64/stack.o purgatory/arch/x86_64/purgatory-x86_64.o purgatory/arch/i386/entry32-16.o purgatory/arch/i386/entry32-16-debug.o purgatory/arch/i386/crashdump_backup.o purgatory/arch/i386/console-x86.o purgatory/arch/i386/vga.o purgatory/arch/i386/pic.o purgatory/sha256.o strip --strip-debug -o purgatory/purgatory.ro purgatory/purgatory.ro.sym make: *** [purgatory/Makefile:69: purgatory/purgatory.ro] Segmentation fault (core dumped) koji build link: https://kojipkgs.fedoraproject.org//work/tasks/6067/23536067/build.log Reported rhbz1520805, a binutils bug is pending to be fixed, Will revert this once binutils bug is fixed and usable in koji build system. Signed-off-by: Dave Young --- kexec-tools-2.0.16-koji-build-fail-workaround.patch | 13 +++++++++++++ kexec-tools.spec | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 kexec-tools-2.0.16-koji-build-fail-workaround.patch diff --git a/kexec-tools-2.0.16-koji-build-fail-workaround.patch b/kexec-tools-2.0.16-koji-build-fail-workaround.patch new file mode 100644 index 0000000..c406063 --- /dev/null +++ b/kexec-tools-2.0.16-koji-build-fail-workaround.patch @@ -0,0 +1,13 @@ +diff --git a/purgatory/Makefile b/purgatory/Makefile +index 49ce80a..97b7a03 100644 +--- a/purgatory/Makefile ++++ b/purgatory/Makefile +@@ -67,7 +67,7 @@ $(PURGATORY): $(PURGATORY_OBJS) + $(MKDIR) -p $(@D) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@.sym $^ + # $(LD) $(LDFLAGS) $(EXTRA_LDFLAGS) --no-undefined -e purgatory_start -r -o $@ $(PURGATORY_OBJS) $(UTIL_LIB) +- $(STRIP) --strip-debug -o $@ $@.sym ++ $(STRIP) --strip-debug --no-merge-notes -o $@ $@.sym + + echo:: + @echo "PURGATORY_SRCS $(PURGATORY_SRCS)" diff --git a/kexec-tools.spec b/kexec-tools.spec index 906a033..20fcd8b 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -87,7 +87,7 @@ Obsoletes: diskdumputils netdump kexec-tools-eppic Patch601: kexec-tools-2.0.3-disable-kexec-test.patch Patch602: kexec-tools-2.0.15-makedumpfile-take-care-of-init-level4-pgt-rename-in-kernel.patch Patch603: kexec-tools-2.0.15-makedumpfile-fix-SECTION_MAP_MASK-for-kernel-bigger-than-4.13.patch - +Patch604: kexec-tools-2.0.16-koji-build-fail-workaround.patch %description kexec-tools provides /sbin/kexec binary that facilitates a new @@ -113,6 +113,7 @@ tar -z -x -v -f %{SOURCE23} %patch601 -p1 %patch602 -p1 %patch603 -p1 +%patch604 -p1 %ifarch ppc %define archdef ARCH=ppc