Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add patch disabling bsymbolic functions in VTE
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
|