Skip to content
This repository was archived by the owner on Nov 6, 2022. It is now read-only.
This repository was archived by the owner on Nov 6, 2022. It is now read-only.

[enhancement] set install_name on Darwin platforms #356

@grobian

Description

@grobian

Below is a "trivial" patch :)

Makefile: set install_name on Darwin

https://bugs.gentoo.org/show_bug.cgi?id=546098

--- a/Makefile
+++ b/Makefile
@@ -62,6 +62,8 @@
 ifneq (darwin,$(PLATFORM))
 # TODO(bnoordhuis) The native SunOS linker expects -h rather than -soname...
 LDFLAGS_LIB += -Wl,-soname=$(SONAME)
+else
+LDFLAGS_LIB += -Wl,-install_name,$(LIBDIR)/$(SONAME)
 endif

 test: test_g test_fast

Note that while I use $(SONAME) for consistency, it feels odd because it includes the full version number. SONAME/install_name typically is something like libhttp_parser.2.dylib (or libhttp_parser.so.2), referencing the major version component only. But from the looks of it, this seems intentional, suggesting e.g. 2.6 and 2.7 release are ABI incompatible, as well as 2.6.2 and 2.6.3 would. (E.g. currently any http-parser update will break all consumers.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions