Skip to content

Commit

Permalink
Add patch disabling bsymbolic functions in VTE
Browse files Browse the repository at this point in the history
  • Loading branch information
techee committed Oct 14, 2019
1 parent 1c942b2 commit a04d767
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions patches/04-vte_2.91_bsymbolic.patch
@@ -0,0 +1,65 @@
From 347f7dd9b1c11244156bfb593866306c735cb06a Mon Sep 17 00:00:00 2001
From: Christian Persch <chpe@src.gnome.org>
Date: Sun, 13 Oct 2019 21:30:49 +0200
Subject: [PATCH] build: Add option to disable -Bsymbolic-functions

Fixes: https://gitlab.gnome.org/GNOME/vte/issues/184
---
meson.build | 16 +++++++++++-----
meson_options.txt | 9 +++++++++
2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/meson.build b/meson.build
index a479f10f..06294595 100644
--- a/meson.build
+++ b/meson.build
@@ -372,15 +372,21 @@ add_project_arguments(global_cxxflags, language: 'cpp')
# Linker flags

linker_flags = [
- '-Wl,-Bsymbolic-functions'
+ [ '-Wl,-Bsymbolic-functions', get_option('_b_symbolic_functions'),],
]

foreach flag: linker_flags
- assert(cc.has_link_argument(flag), flag + ' is required but not supported')
- add_project_link_arguments(flag, language: 'c')
+ if cc.has_link_argument(flag[0])
+ add_project_link_arguments(flag[0], language: 'c')
+ elif flag[1]
+ assert(false, flag[0] + ' is required but not supported')
+ endif

- assert(cxx.has_link_argument(flag), flag + ' is required but not supported')
- add_project_link_arguments(flag, language: 'cpp')
+ if cxx.has_link_argument(flag[0])
+ add_project_link_arguments(flag[0], language: 'cpp')
+ elif flag[1]
+ assert(false, flag[0] + ' is required but not supported')
+ endif
endforeach

# Dependencies
diff --git a/meson_options.txt b/meson_options.txt
index d29c66a3..5d8c8798 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -13,6 +13,15 @@
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <https://www.gnu.org/licenses/>.

+# This option allows you to disable -Bsymbolic-functions if your linker
+# doesn't support it.
+option(
+ '_b_symbolic_functions',
+ type: 'boolean',
+ value: true,
+ description: 'Use -Bsymbolic-functions',
+)
+
option(
'debugg', # for some reason, 'debug' is "reserved"
type: 'boolean',
--
2.20.1

0 comments on commit a04d767

Please sign in to comment.