#29838: Generate shared libraries what can be processed with install_name_tool (one step toward shared library relocation) --------------------------------+------------------------------------------- Reporter: gellule.xg@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: base | Version: 1.9.2 Keywords: | Port: --------------------------------+------------------------------------------- "install_name_tool" changes dynamic shared library install names and/or adds, changes or deletes the rpaths recorded in a Mach-O binary. For this tool to work when the install names or rpaths are larger the binary should be built with the ld "headerpad_max_install_names" option. This tool can therefore be used to relocate a shared library outside of the macports tree. The purpose of this ticket is to add to LDFLAGS the "-Wl,-headerpad_max_install_names" option for all ports. A simple approach would be to modify portconfigure.tcl by setting "default configure.ldflags" to: {{{ default configure.ldflags {"-L${prefix}/lib -Wl,-headerpad_max_install_names"} }}} I haven't been able to identify a drawback to this default addition. There is a thread related to this issue that mentions the fact that some ports do erase the default ldflags: [http://lists.macosforge.org/pipermail /macports-dev/2011-March/thread.html#14202] This addition helps with relocation, but does not guarantee it: there could well be other aspects of the built libraries that are not compatible with a relocation. -- Ticket URL: <https://trac.macports.org/ticket/29838> MacPorts <http://www.macports.org/> Ports system for Mac OS