diff options
Diffstat (limited to 'eclass/tree-sitter-grammar.eclass')
-rw-r--r-- | eclass/tree-sitter-grammar.eclass | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/eclass/tree-sitter-grammar.eclass b/eclass/tree-sitter-grammar.eclass index 69ad467f8be7..acdb8a7ad73b 100644 --- a/eclass/tree-sitter-grammar.eclass +++ b/eclass/tree-sitter-grammar.eclass @@ -76,11 +76,17 @@ tree-sitter-grammar_src_compile() { fi local soname=lib${PN}$(get_libname $(_get_tsg_abi_ver)) + + local soname_args="-Wl,--soname=${soname}" + if [[ ${CHOST} == *darwin* ]] ; then + soname_args="-Wl,-install_name,${EPREFIX}/usr/$(get_libdir)/${soname}" + fi + edo ${link} ${LDFLAGS} \ -shared \ *.o \ - -Wl,--soname=${soname} \ - -o "${WORKDIR}"/${soname} || die + ${soname_args} \ + -o "${WORKDIR}"/${soname} } # @FUNCTION: tree-sitter-grammar_src_install |