From 3e636fe3a6957edc4ac5d2c570c755c36fd49338 Mon Sep 17 00:00:00 2001 From: Laura Abbott Date: Thu, 15 Aug 2019 15:49:20 -0400 Subject: [PATCH] Remove patch for GCC VTA It's been years and gcc has changed a lot. Signed-off-by: Laura Abbott --- Kbuild-Add-an-option-to-enable-GCC-VTA.patch | 94 -------------------- kernel.spec | 2 - 2 files changed, 96 deletions(-) delete mode 100644 Kbuild-Add-an-option-to-enable-GCC-VTA.patch diff --git a/Kbuild-Add-an-option-to-enable-GCC-VTA.patch b/Kbuild-Add-an-option-to-enable-GCC-VTA.patch deleted file mode 100644 index 6bbb0efdf..000000000 --- a/Kbuild-Add-an-option-to-enable-GCC-VTA.patch +++ /dev/null @@ -1,94 +0,0 @@ -From a446d2f94ce540689c7a46bf457d92409e9c4d7e Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Fri, 21 Nov 2014 10:40:00 -0800 -Subject: [PATCH] Kbuild: Add an option to enable GCC VTA -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Due to recent codegen issues, gcc -fvar-tracking-assignments was -unconditionally disabled in commit 2062afb4f804a ("Fix gcc-4.9.0 -miscompilation of load_balance() in scheduler"). However, this reduces -the debuginfo coverage for variable locations, especially in inline -functions. VTA is certainly not perfect either in those cases, but it -is much better than without. With compiler versions that have fixed the -codegen bugs, we would prefer to have the better details for SystemTap, -and surely other debuginfo consumers like perf will benefit as well. - -This patch simply makes CONFIG_DEBUG_INFO_VTA an option. I considered -Frank and Linus's discussion of a cc-option-like -fcompare-debug test, -but I'm convinced that a narrow test of an arch-specific codegen issue -is not really useful. GCC has their own regression tests for this, so -I'd suggest GCC_COMPARE_DEBUG=-fvar-tracking-assignments-toggle is more -useful for kernel developers to test confidence. - -In fact, I ran into a couple more issues when testing for this patch[1], -although neither of those had any codegen impact. - [1] https://bugzilla.redhat.com/show_bug.cgi?id=1140872 - -With gcc-4.9.2-1.fc22, I can now build v3.18-rc5 with Fedora's i686 and -x86_64 configs, and this is completely clean with GCC_COMPARE_DEBUG. - -Cc: Frank Ch. Eigler -Cc: Jakub Jelinek -Cc: Josh Boyer -Cc: Greg Kroah-Hartman -Cc: Linus Torvalds -Cc: Andrew Morton -Cc: Markus Trippelsdorf -Cc: Michel Dänzer -Signed-off-by: Josh Stone -Signed-off-by: Jeremy Cline ---- - Makefile | 4 ++++ - lib/Kconfig.debug | 18 +++++++++++++++++- - 2 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 9ef547fc7ffe..5777d902f8f3 100644 ---- a/Makefile -+++ b/Makefile -@@ -735,7 +735,11 @@ KBUILD_CFLAGS += -fomit-frame-pointer - KBUILD_CFLAGS += -ftrivial-auto-var-init=pattern - endif - -+ifdef CONFIG_DEBUG_INFO_VTA -+DEBUG_CFLAGS += $(call cc-option, -fvar-tracking-assignments) -+else - DEBUG_CFLAGS := $(call cc-option, -fno-var-tracking-assignments) -+endif - - ifdef CONFIG_DEBUG_INFO - ifdef CONFIG_DEBUG_INFO_SPLIT -diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug -index 0d9e81779e37..424206212931 100644 ---- a/lib/Kconfig.debug -+++ b/lib/Kconfig.debug -@@ -217,7 +217,23 @@ config DEBUG_INFO_DWARF4 - Generate dwarf4 debug info. This requires recent versions - of gcc and gdb. It makes the debug information larger. - But it significantly improves the success of resolving -- variables in gdb on optimized code. -+ variables in gdb on optimized code. The gcc docs also -+ recommend enabling -fvar-tracking-assignments for maximum -+ benefit. (see DEBUG_INFO_VTA) -+ -+config DEBUG_INFO_VTA -+ bool "Enable var-tracking-assignments for debuginfo" -+ depends on DEBUG_INFO -+ help -+ Enable gcc -fvar-tracking-assignments for improved debug -+ information on variable locations in optimized code. Per -+ gcc, DEBUG_INFO_DWARF4 is recommended for best use of VTA. -+ -+ VTA has been implicated in codegen bugs (gcc PR61801, -+ PR61904), so this may deserve some caution. One can set -+ GCC_COMPARE_DEBUG=-fvar-tracking-assignments-toggle in the -+ environment to automatically compile everything both ways, -+ generating an error if anything differs. - - config DEBUG_INFO_BTF - bool "Generate BTF typeinfo" --- -2.20.1 - diff --git a/kernel.spec b/kernel.spec index a533bbf01..a02584048 100644 --- a/kernel.spec +++ b/kernel.spec @@ -495,8 +495,6 @@ Source5000: patch-5.%{base_sublevel}-git%{gitrev}.xz # Standalone patches # 100 - Generic long running patches -Patch115: Kbuild-Add-an-option-to-enable-GCC-VTA.patch - Patch116: crash-driver.patch Patch122: Input-synaptics-pin-3-touches-when-the-firmware-repo.patch