Skip to content

Commit

Permalink
meson: Do not define rpath with a linker argument, GitHub #1443
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmark committed Sep 8, 2024
1 parent 7326731 commit 9bdcc1c
Show file tree
Hide file tree
Showing 7 changed files with 86 additions and 198 deletions.
28 changes: 9 additions & 19 deletions bin/aecho/meson.build
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
if enable_rpath
executable(
'aecho',
'aecho.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
else
executable(
'aecho',
'aecho.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
)
endif
executable(
'aecho',
'aecho.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
28 changes: 9 additions & 19 deletions bin/getzones/meson.build
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
if enable_rpath
executable(
'getzones',
'getzones.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
else
executable(
'getzones',
'getzones.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
)
endif
executable(
'getzones',
'getzones.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
78 changes: 27 additions & 51 deletions bin/nbp/meson.build
Original file line number Diff line number Diff line change
@@ -1,51 +1,27 @@
if enable_rpath
executable(
'nbplkup',
'nbplkup.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
executable(
'nbprgstr',
'nbprgstr.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
executable(
'nbpunrgstr',
'nbpunrgstr.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
else
executable(
'nbplkup',
'nbplkup.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
)
executable(
'nbprgstr',
'nbprgstr.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
)
executable(
'nbpunrgstr',
'nbpunrgstr.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
)
endif
executable(
'nbplkup',
'nbplkup.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
executable(
'nbprgstr',
'nbprgstr.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
executable(
'nbpunrgstr',
'nbpunrgstr.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
53 changes: 18 additions & 35 deletions bin/pap/meson.build
Original file line number Diff line number Diff line change
@@ -1,35 +1,18 @@
if enable_rpath
executable(
'pap',
'pap.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
executable(
'papstatus',
'papstatus.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
else
executable(
'pap',
'pap.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
)
executable(
'papstatus',
'papstatus.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
)
endif
executable(
'pap',
'pap.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
executable(
'papstatus',
'papstatus.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
build_rpath: libdir,
install_rpath: libdir,
)
34 changes: 11 additions & 23 deletions contrib/a2boot/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,14 @@ a2boot_c_args = [
'-D_PATH_P16_IMAGE="' + pkgconfdir + '/a2boot/ProDOS16 Image"',
]

if enable_rpath
executable(
'a2boot',
'a2boot.c',
include_directories: root_includes,
link_with: libatalk,
c_args: a2boot_c_args,
install: true,
install_dir: sbindir,
build_rpath: libdir,
install_rpath: libdir,
)
else
executable(
'a2boot',
'a2boot.c',
include_directories: root_includes,
link_with: libatalk,
c_args: a2boot_c_args,
install: true,
install_dir: sbindir,
)
endif
executable(
'a2boot',
'a2boot.c',
include_directories: root_includes,
link_with: libatalk,
c_args: a2boot_c_args,
install: true,
install_dir: sbindir,
build_rpath: libdir,
install_rpath: libdir,
)
31 changes: 10 additions & 21 deletions contrib/timelord/meson.build
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
if enable_rpath
executable(
'timelord',
'timelord.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
install_dir: sbindir,
build_rpath: libdir,
install_rpath: libdir,
)
else
executable(
'timelord',
'timelord.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
install_dir: sbindir,
)
endif
executable(
'timelord',
'timelord.c',
include_directories: root_includes,
link_with: libatalk,
install: true,
install_dir: sbindir,
build_rpath: libdir,
install_rpath: libdir,
)
32 changes: 2 additions & 30 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -388,16 +388,10 @@ compiler_64_bit_mode = run_command(
# Check whether to enable rpath (the default on Solaris and NetBSD)
#

if host_os == 'sunos' or host_os == 'netbsd'
enable_rpath = true
else
enable_rpath = get_option('with-rpath')
endif
rpath_libdir = ''

if enable_rpath
if host_os == 'sunos' or host_os == 'netbsd' or get_option('with-rpath')
rpath_libdir = libdir
else
rpath_libdir = ''
endif

#
Expand Down Expand Up @@ -477,10 +471,6 @@ else
endforeach
endif

if enable_rpath
bdb_link_args += '-Wl,-rpath,' + bdb_libdir
endif

if bdb_header != ''
have_bdb = true
bdb_major_version += run_command(
Expand Down Expand Up @@ -597,9 +587,6 @@ endif

if (have_wolfssl or have_embedded_ssl) and nettle.found()
have_ssl = true
if enable_rpath
ssl_link_args += ['-Wl,-rpath,' / nettle.get_variable(pkgconfig: 'libdir')]
endif
ssl_deps += nettle
if have_ssl_override
have_wolfssl = false
Expand All @@ -610,9 +597,6 @@ if (have_wolfssl or have_embedded_ssl) and nettle.found()
have_embedded_ssl = false
ssl_deps += wolfssl
ssl_provider += 'WolfSSL'
if enable_rpath
ssl_link_args += ['-Wl,-rpath,' / wolfssl.get_variable(pkgconfig: 'libdir')]
endif
cdata.set('WOLFSSL_DHX', 1)
elif have_embedded_ssl
have_wolfssl = false
Expand Down Expand Up @@ -1072,9 +1056,6 @@ libgcrypt_link_args = []

if libgcrypt_path != ''
libgcrypt_link_args += ['-L' + libgcrypt_path / 'lib', '-lgcrypt']
if enable_rpath
libgcrypt_link_args += ['-Wl,-rpath,' + libgcrypt_path / 'lib']
endif
libgcrypt = declare_dependency(
link_args: libgcrypt_link_args,
include_directories: include_directories(libgcrypt_path / 'include'),
Expand Down Expand Up @@ -1387,9 +1368,6 @@ ldap_link_args = []

if ldap_path != ''
ldap_link_args += ['-L' + ldap_path / 'lib', '-lldap']
if enable_rpath
ldap_link_args += ['-Wl,-rpath,' + ldap_path / 'lib']
endif
ldap = declare_dependency(
link_args: ldap_link_args,
include_directories: include_directories(ldap_path / 'include'),
Expand Down Expand Up @@ -1453,9 +1431,6 @@ libiconv_link_args = []

if iconv_path != ''
libiconv_link_args += ['-L' + iconv_path / 'lib', '-liconv']
if enable_rpath
libiconv_link_args += ['-Wl,-rpath,' + iconv_path / 'lib']
endif
iconv = declare_dependency(
link_args: libiconv_link_args,
include_directories: include_directories(iconv_path / 'include'),
Expand Down Expand Up @@ -1691,9 +1666,6 @@ else

if pam_path != '' and pam_dir != '/'
pam_link_args += ['-L' + pam_path / 'lib', '-lpam']
if enable_rpath
pam_link_args += ['-Wl,-rpath,' + pam_path / 'lib']
endif
pam = declare_dependency(
link_args: pam_link_args,
include_directories: include_directories(pam_path / 'include'),
Expand Down

0 comments on commit 9bdcc1c

Please sign in to comment.