[libpeas/wip/lantw/build-dont-use-undocumented-export-dynamic-option] build: don't use undocumented -export-dynamic option



commit e5fc059d160865b0956f0c760652c11a10dbfdb5
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Sat Sep 7 15:05:15 2019 +0800

    build: don't use undocumented -export-dynamic option
    
    GNU libtool is documented to support -export-dynamic and GNU ld is
    documented to support --export-dynamic. However, GCC isn't documented
    to support them. While GCC does support -export-dynamic for backwards
    compatibility, Clang doesn't support it and interprets it wrongly. This
    causes warnings to be shown during linking because Clang splits it into
    '-e xport-dynamic' and the linker can't find 'xport-dynamic' symbol.

 tests/libpeas-gtk/testing/meson.build   | 2 +-
 tests/libpeas/introspection/meson.build | 2 +-
 tests/libpeas/testing/meson.build       | 2 +-
 tests/testing-util/meson.build          | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/libpeas-gtk/testing/meson.build b/tests/libpeas-gtk/testing/meson.build
index ea9dbc5..f82e78b 100644
--- a/tests/libpeas-gtk/testing/meson.build
+++ b/tests/libpeas-gtk/testing/meson.build
@@ -24,7 +24,7 @@ libpeas_gtk_testing_c_args = [
 ]
 
 libpeas_gtk_testing_link_args = [
-  '-export-dynamic',
+  '-Wl,--export-dynamic',
 ]
 
 libpeas_gtk_testing_lib = library(
diff --git a/tests/libpeas/introspection/meson.build b/tests/libpeas/introspection/meson.build
index 2cb4628..7f5ee85 100644
--- a/tests/libpeas/introspection/meson.build
+++ b/tests/libpeas/introspection/meson.build
@@ -30,7 +30,7 @@ libintrospection_c_args = [
 ]
 
 libintrospection_link_args = [
-  '-export-dynamic',
+  '-Wl,--export-dynamic',
 ]
 
 libintrospection_lib = library(
diff --git a/tests/libpeas/testing/meson.build b/tests/libpeas/testing/meson.build
index 2dd3d7b..3bb803e 100644
--- a/tests/libpeas/testing/meson.build
+++ b/tests/libpeas/testing/meson.build
@@ -26,7 +26,7 @@ libpeas_testing_c_args = [
 ]
 
 libpeas_testing_link_args = [
-  '-export-dynamic',
+  '-Wl,--export-dynamic',
 ]
 
 libpeas_testing_lib = library(
diff --git a/tests/testing-util/meson.build b/tests/testing-util/meson.build
index 890ddb8..5486bc6 100644
--- a/tests/testing-util/meson.build
+++ b/tests/testing-util/meson.build
@@ -22,7 +22,7 @@ libtesting_util_c_args = [
 ]
 
 libtesting_util_link_args = [
-  '-export-dynamic',
+  '-Wl,--export-dynamic',
 ]
 
 libtesting_util_lib = library(


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]