daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
4fbe94
From 9f259b46b760b2aa08ac1fe76fe61df514e2768f Mon Sep 17 00:00:00 2001
4fbe94
From: Michal Sekletar <msekleta@redhat.com>
4fbe94
Date: Tue, 3 Sep 2019 10:05:42 +0200
4fbe94
Subject: [PATCH] buildsys: don't garbage collect sections while linking
4fbe94
4fbe94
gc-sections is actually very aggressive and garbage collects ELF
4fbe94
sections used by annobin gcc plugin and annocheck then reports gaps in
4fbe94
coverage. Let's drop that linker flag.
4fbe94
4fbe94
RHEL-only
4fbe94
4fbe94
Resolves: #1748258
4fbe94
---
4fbe94
 meson.build | 2 --
4fbe94
 1 file changed, 2 deletions(-)
4fbe94
4fbe94
diff --git a/meson.build b/meson.build
4fbe94
index 04b461dcd4..613a5133b6 100644
4fbe94
--- a/meson.build
4fbe94
+++ b/meson.build
4fbe94
@@ -357,8 +357,6 @@ if get_option('buildtype') != 'debug'
4fbe94
                 '-ffunction-sections',
4fbe94
                 '-fdata-sections',
4fbe94
         ]
4fbe94
-
4fbe94
-        possible_link_flags += '-Wl,--gc-sections'
4fbe94
 endif
4fbe94
 
4fbe94
 add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')