Blame disable-default-compression-dwz-test.patch

6a24acf
From 1f9597d3ca2e7d3497f9d28046bbae5522742306 Mon Sep 17 00:00:00 2001
6a24acf
From: Derek Parker <deparker@redhat.com>
6a24acf
Date: Wed, 20 Feb 2019 13:26:18 -0800
6a24acf
Subject: [PATCH] pkg/proc: Disable default compression on DWZ test
6a24acf
6a24acf
When compression is applied by default running the DWZ tool on the
6a24acf
resulting binary will crash.
6a24acf
6a24acf
The actual default compression code will look and see if compression
6a24acf
makes any difference and if so replace the normal `.debug_*` section
6a24acf
with `.zdebug_*`. This is why it may not have been hit before. On one of
6a24acf
my workstations I build with 1.12rc1 and no compression happens, but on
6a24acf
a Fedora VM I build and the binary results in compressed DWARF sections.
6a24acf
6a24acf
Adding this flag will make this test more consistent overall.
6a24acf
---
6a24acf
 pkg/proc/test/support.go | 3 +++
6a24acf
 1 file changed, 3 insertions(+)
6a24acf
6a24acf
diff --git a/pkg/proc/test/support.go b/pkg/proc/test/support.go
6a24acf
index 9e09da861ec53657bfa0fb9cf76620a4fcd485dc..ccfc1c4939ef6e9c8abbbc67f4fbeaaf0e623de1 100644
6a24acf
--- a/pkg/proc/test/support.go
6a24acf
+++ b/pkg/proc/test/support.go
6a24acf
@@ -125,6 +125,9 @@ func BuildFixture(name string, flags BuildFlags) Fixture {
6a24acf
 	if flags&BuildModePIE != 0 {
6a24acf
 		buildFlags = append(buildFlags, "-buildmode=pie")
6a24acf
 	}
6a24acf
+	if flags&EnableDWZCompression != 0 {
6a24acf
+		buildFlags = append(buildFlags, "-ldflags=-compressdwarf=false")
6a24acf
+	}
6a24acf
 	if path != "" {
6a24acf
 		buildFlags = append(buildFlags, name+".go")
6a24acf
 	}
6a24acf
-- 
6a24acf
2.16.5
6a24acf