Commit 720fbeec authored by Lubomir Rintel's avatar Lubomir Rintel
Browse files

meson: drop unuseful -Wl,--version-script check

Meson complains that it doesn't work:

  WARNING: -Wl,--version-script looks like a linker argument, but
  has_argument and other similar methods only support checking compiler
  arguments. Using them to check linker arguments are never supported, and
  results are likely to be wrong regardless of the compiler you are using.
  has_link_argument or other similar method can be used instead.

The has_link_argument() function requires meson 0.46 (we depend on 0.43)
and it can't check for options without argument.

Let's drop the check instead. It complicates things for no good reason:
we don't want to build on platforms that don't support symbol versioning
anyways.
parent 1eb17ef9
......@@ -107,9 +107,6 @@ endif
add_project_arguments(common_flags, language: 'c')
add_project_link_arguments(common_ldflags, language: 'c')
ldflag = '-Wl,--version-script'
have_version_script = host_machine.system().contains('linux') and cc.has_argument(ldflag)
linker_script_ver = join_paths(meson.source_root(), 'linker-script-binary.ver')
# Check for iso-codes for country names translation
......
......@@ -98,11 +98,6 @@ cflags = [
'-DICONDIR="@0@"'.format(nma_icondir)
]
ldflags = []
if have_version_script
ldflags += '-Wl,--version-script,@0@'.format(linker_script_ver)
endif
if enable_selinux
deps += libselinux_dep
endif
......@@ -117,7 +112,7 @@ executable(
include_directories: incs,
dependencies: deps,
c_args: cflags,
link_args: ldflags,
link_args: '-Wl,--version-script,@0@'.format(linker_script_ver),
link_depends: linker_script_ver,
link_whole: libwireless_security_libnm,
install: true,
......
......@@ -63,11 +63,6 @@ cflags = [
symbol_map = join_paths(meson.current_source_dir(), 'libnm-gtk.ver')
ldflags = []
if have_version_script
ldflags += '-Wl,--version-script,' + symbol_map
endif
libnm_gtk = shared_library(
'nm-gtk',
sources: sources,
......@@ -75,7 +70,7 @@ libnm_gtk = shared_library(
include_directories: incs,
dependencies: deps,
c_args: cflags,
link_args: ldflags,
link_args: '-Wl,--version-script,' + symbol_map,
link_depends: symbol_map,
link_whole: libwireless_security_libnm_glib,
install: true,
......
......@@ -71,11 +71,6 @@ cflags = [
symbol_map = join_paths(meson.current_source_dir(), 'libnma.ver')
ldflags = []
if have_version_script
ldflags += '-Wl,--version-script,' + symbol_map
endif
if enable_gcr
headers += files(
'nma-cert-chooser-button.h',
......@@ -100,7 +95,7 @@ libnma = shared_library(
include_directories: incs,
dependencies: deps,
c_args: cflags,
link_args: ldflags,
link_args: '-Wl,--version-script,' + symbol_map,
link_depends: symbol_map,
link_whole: libwireless_security_libnm,
install: true,
......
......@@ -88,11 +88,6 @@ cflags = [
'-DG_LOG_DOMAIN="@0@"'.format(nma_name)
]
ldflags = []
if have_version_script
ldflags += '-Wl,--version-script,@0@'.format(linker_script_ver)
endif
if enable_appindicator == 'ayatana' or enable_appindicator == 'ubuntu'
deps += [
appindicator_dep,
......@@ -112,7 +107,7 @@ executable(
include_directories: incs,
dependencies: deps,
c_args: cflags,
link_args: ldflags,
link_args: '-Wl,--version-script,@0@'.format(linker_script_ver),
link_depends: linker_script_ver,
link_whole: libwireless_security_libnm,
install: true,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment