From 79449e6612a55d739b7b861174561d69afea7641 Mon Sep 17 00:00:00 2001 From: WANG Chao Date: Mon, 15 Sep 2014 12:07:57 +0800 Subject: [PATCH] kexec/ppc64: disabling exception handling when building the purgatory Backport the following commit from upstream kexec-tools: commit 335bad7 Author: Laurent Dufour Date: Tue Jul 22 18:22:28 2014 +0200 kexec/ppc64: disabling exception handling when building the purgatory Some Linux distributions would like to turn on the GCC exception handling by default. As this option introduces symbols in the built code that are defined in a separate shared library, this is not a good idea to have such an option activated when building the purgatory. This patch forces the exception handling to be turned off when building the purgatory on ppc64 BE and LE. Signed-off-by: Laurent Dufour Signed-off-by: Simon Horman This is part of the work to enable ppc64le. Signed-off-by: WANG Chao Acked-by: Vivek Goyal --- ...bling-exception-handling-when-buildi.patch | 37 +++++++++++++++++++ kexec-tools.spec | 2 + 2 files changed, 39 insertions(+) create mode 100644 kexec-tools-2.0.7-kexec-ppc64-disabling-exception-handling-when-buildi.patch diff --git a/kexec-tools-2.0.7-kexec-ppc64-disabling-exception-handling-when-buildi.patch b/kexec-tools-2.0.7-kexec-ppc64-disabling-exception-handling-when-buildi.patch new file mode 100644 index 0000000..4c92242 --- /dev/null +++ b/kexec-tools-2.0.7-kexec-ppc64-disabling-exception-handling-when-buildi.patch @@ -0,0 +1,37 @@ +From 335bad77fb0750f3961aa8df47c83a522d212b08 Mon Sep 17 00:00:00 2001 +From: Laurent Dufour +Date: Tue, 22 Jul 2014 18:22:28 +0200 +Subject: [PATCH] kexec/ppc64: disabling exception handling when building the + purgatory + +Some Linux distributions would like to turn on the GCC exception handling +by default. As this option introduces symbols in the built code that are +defined in a separate shared library, this is not a good idea to have such +an option activated when building the purgatory. + +This patch forces the exception handling to be turned off when building the +purgatory on ppc64 BE and LE. + +Signed-off-by: Laurent Dufour +Signed-off-by: Simon Horman +--- + purgatory/arch/ppc64/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/purgatory/arch/ppc64/Makefile b/purgatory/arch/ppc64/Makefile +index 712e2b1..6c58fa2 100644 +--- a/purgatory/arch/ppc64/Makefile ++++ b/purgatory/arch/ppc64/Makefile +@@ -9,7 +9,8 @@ ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/console-ppc64.c + ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/crashdump_backup.c + ppc64_PURGATORY_SRCS += purgatory/arch/ppc64/misc.S + +-ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float -fno-stack-protector ++ppc64_PURGATORY_EXTRA_CFLAGS += -m64 -msoft-float -fno-stack-protector \ ++ -fno-exceptions + ppc64_PURGATORY_EXTRA_ASFLAGS += -m64 + ifeq ($(SUBARCH),BE) + ppc64_PURGATORY_EXTRA_LDFLAGS += -melf64ppc +-- +1.9.3 + diff --git a/kexec-tools.spec b/kexec-tools.spec index 60db2ef..3339043 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -68,6 +68,7 @@ Patch101: kexec-tools-2.0.7-Provide-an-option-to-use-new-kexec-system-call.patch # Patches 301 through 400 are meant for ppc64 kexec-tools enablement # Patch301: kexec-tools-2.0.7-kexec-ppc64-move-to-device-tree-version-17.patch +Patch302: kexec-tools-2.0.7-kexec-ppc64-disabling-exception-handling-when-buildi.patch # # Patches 401 through 500 are meant for s390 kexec-tools enablement @@ -130,6 +131,7 @@ tar -z -x -v -f %{SOURCE23} %patch606 -p1 %patch607 -p1 %patch301 -p1 +%patch302 -p1 %ifarch ppc %define archdef ARCH=ppc