PKGBUILDs/core/glib2/libs.diff

129 lines
5 KiB
Diff
Raw Normal View History

2017-10-11 16:36:01 +00:00
diff --git i/gio/meson.build w/gio/meson.build
index 32526362666b5e80..d7030aa29a6f17eb 100644
--- i/gio/meson.build
+++ w/gio/meson.build
@@ -727,7 +727,7 @@ libgio = shared_library('gio-2.0',
libgobject_dep, libgmodule_dep] + platform_deps + network_libs,
c_args : gio_c_args,
# intl.lib is not compatible with SAFESEH
- link_args : noseh_link_args,
+ link_args : noseh_link_args + library_link_args,
)
libgio_dep = declare_dependency(link_with : libgio,
2017-10-11 14:21:53 +00:00
diff --git i/glib/meson.build w/glib/meson.build
2017-10-11 16:36:01 +00:00
index 1da0bcd3cc601b9e..4286218c9c8361b2 100644
2017-10-11 14:21:53 +00:00
--- i/glib/meson.build
+++ w/glib/meson.build
2017-10-11 16:36:01 +00:00
@@ -227,7 +227,7 @@ libglib = shared_library('glib-2.0',
soversion : soversion,
install : true,
# intl.lib is not compatible with SAFESEH
- link_args : noseh_link_args,
+ link_args : noseh_link_args + library_link_args,
include_directories : configinc,
link_with : [charset_lib, gnulib_lib],
dependencies : [pcre, thread_dep, libintl, librt] + libiconv + platform_deps,
2017-10-11 14:21:53 +00:00
@@ -284,7 +284,7 @@ configure_file(
output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
install: true,
- install_dir: join_paths(get_option('datadir'), 'gdb/auto-load' + get_option('libdir'))
+ install_dir: join_paths(get_option('datadir'), 'gdb/auto-load' + glib_libdir)
)
if enable_systemtap
diff --git i/gmodule/meson.build w/gmodule/meson.build
2017-10-11 16:36:01 +00:00
index 191bca2446f9977e..fd0219d9225f2f3f 100644
2017-10-11 14:21:53 +00:00
--- i/gmodule/meson.build
+++ w/gmodule/meson.build
@@ -37,7 +37,7 @@ elif cc.has_function('NSLinkModule')
elif cc.links(dlopen_dlsym_test_code, args : '-ldl', name : 'dlopen() and dlsym() in libdl')
g_module_impl = 'G_MODULE_IMPL_DL'
libdl_dep = cc.find_library('dl')
- g_module_lib_args = '-ldl'
+ g_module_lib_args = ['-ldl']
endif
# additional checks for G_MODULE_IMPL_DL
2017-10-11 16:36:01 +00:00
@@ -72,25 +72,29 @@ if g_module_impl == ''
2017-10-11 14:21:53 +00:00
message('WARNING: No suitable GModule implementation found!')
endif
+# For pc files
+glib_conf.set('G_MODULE_SUPPORTED', g_module_impl == '0' ? 'false' : 'true')
+glib_conf.set('G_MODULE_LIBS', ' '.join(g_module_lib_args))
+
gmoduleconf_conf.set('G_MODULE_IMPL', g_module_impl)
-gmoduleconf_conf.set('G_MODULE_SUPPORTED', g_module_impl != '0')
gmoduleconf_conf.set('G_MODULE_HAVE_DLERROR', g_module_have_dlerror)
gmoduleconf_conf.set('G_MODULE_NEED_USCORE', g_module_need_uscore)
gmoduleconf_conf.set('G_MODULE_BROKEN_RTLD_GLOBAL', g_module_broken_rtld_global)
2017-10-11 16:36:01 +00:00
gmoduleconf_h = configure_file(input : 'gmoduleconf.h.in',
output : 'gmoduleconf.h',
configuration : gmoduleconf_conf)
install_headers(['gmodule.h'], subdir : 'glib-2.0')
libgmodule = shared_library('gmodule-2.0',
sources : ['gmodule.c'],
version : library_version,
soversion : soversion,
install : true,
include_directories : [configinc, gmoduleinc],
dependencies : [libdl_dep, libglib_dep],
+ link_args : library_link_args,
c_args : ['-DG_LOG_DOMAIN="GModule"', '-DG_DISABLE_DEPRECATED'] + glib_hidden_visibility_args)
libgmodule_dep = declare_dependency(link_with : libgmodule,
2017-10-11 14:21:53 +00:00
diff --git i/gobject/meson.build w/gobject/meson.build
2017-10-11 16:36:01 +00:00
index aecca57c743d5956..e033ae15f9c226b5 100644
2017-10-11 14:21:53 +00:00
--- i/gobject/meson.build
+++ w/gobject/meson.build
2017-10-11 16:36:01 +00:00
@@ -61,6 +61,7 @@ libgobject = shared_library('gobject-2.0',
install : true,
include_directories : [configinc],
dependencies : [libintl, libffi_dep, libglib_dep],
+ link_args : library_link_args,
c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION'] + glib_hidden_visibility_args)
libgobject_dep = declare_dependency(link_with : libgobject,
@@ -102,7 +103,7 @@ configure_file(
2017-10-11 14:21:53 +00:00
output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
install: true,
- install_dir: join_paths(get_option('datadir'), 'gdb/auto-load/' + get_option('libdir'))
+ install_dir: join_paths(get_option('datadir'), 'gdb/auto-load/' + glib_libdir)
)
if enable_systemtap
2017-10-11 16:36:01 +00:00
diff --git i/gthread/meson.build w/gthread/meson.build
index 8ccac3369894bda4..2d5913a91525460f 100644
--- i/gthread/meson.build
+++ w/gthread/meson.build
@@ -6,4 +6,5 @@ libgthread = shared_library('gthread-2.0',
soversion : soversion,
install : true,
dependencies : [libglib_dep],
+ link_args : library_link_args,
c_args : ['-DG_LOG_DOMAIN="GThread"' ] + glib_hidden_visibility_args)
2017-10-11 14:21:53 +00:00
diff --git i/meson.build w/meson.build
2017-10-11 16:36:01 +00:00
index 0f3f7917899e93ea..12277e8d327b7a83 100644
2017-10-11 14:21:53 +00:00
--- i/meson.build
+++ w/meson.build
2017-10-11 16:36:01 +00:00
@@ -1533,6 +1533,13 @@ glib_conf.set('GIO_MODULE_DIR', '${libdir}/gio/modules')
2017-10-11 14:21:53 +00:00
# @G_MODULE_LIBS@ @SELINUX_LIBS@ @COCOA_LIBS@ @CARBON_LIBS@ @G_LIBS_EXTRA@
# @PCRE_REQUIRES@ @GLIB_EXTRA_CFLAGS@ @G_THREAD_CFLAGS@
+# HACK
+glib_conf.set('G_THREAD_LIBS', '-pthread')
+glib_conf.set('G_THREAD_CFLAGS', '-pthread')
+glib_conf.set('G_MODULE_LDFLAGS', '-Wl,--export-dynamic')
+glib_conf.set('PCRE_REQUIRES', 'libpcre')
2017-10-11 16:36:01 +00:00
+library_link_args = [ '-Wl,-z,nodelete' ]
2017-10-11 14:21:53 +00:00
+
# Tracing: dtrace
want_dtrace = get_option('enable-dtrace')
enable_dtrace = false