Use configure.ldflags-delete instead of configure.ldflags?

Ryan Schmidt ryandesign at macports.org
Fri Mar 18 01:57:57 PDT 2011


On Mar 18, 2011, at 03:41, Anders F Björklund wrote:

> Ryan Schmidt wrote:
> 
>>>>> and 'ldflags' should (imho) be safe for a port to simply reset. This seems demonstrative of the problems that can emerge with base implicitly setting environmental variables and other build-time arguments; it's much harder to control them directly from a port when you need something different.
>>>> 
>>>> Then how would you suggest the user's need -- of building all libraries with maximum header padding -- be met?
>>> 
>>> "port install inkscape" ?
>> 
>> ...how does that meet the need? To my knowledge, by default, software does not build using the maximum header padding flag. This thread is the discussion about adding that flag to base.
> 
> "I am trying to have "-Xlinker -headerpad_max_install_names" added to all ports' ldflags by modifying /opt/local/share/macports/Tcl/port1.0/portconfigure.tcl"
> 
> "I managed to build the dependencies for inkscape (the reason why I am doing all this) with "-Wl,-headerpad_max_install_names" added to portconfigure.tcl without apparent problem."
> 
> So it seems like the main reason to add the maximum header padding is so that one can modify the libraries with install_name_tool to be able to relocate them to outside MacPorts for inclusion in an application bundle ?
> 
> If instead including the application in MacPorts, there is no need for such relocation... Of course, there might be other reasons to modify the ldflags. Just like there are some valid reasons to modify cflags.

Yes, I believe the user wants to relocate MacPorts-built libraries using install_name_tool. This is not always possible without increased header padding.

We may not particularly support what this user is doing, but we may very well want to support doing this when we start building and distributing binary packages, so that they could be relocated to whatever prefix the user installed MacPorts to.

Therefore we may want to add the flags for max header padding to the default configure.ldflags in MacPorts as suggested. This would necessitate revisiting portfiles that currently clear configure.ldflags under the assumption that only -L flags are in there.

So, I return to your initial response:

>>>>> and 'ldflags' should (imho) be safe for a port to simply reset. This seems demonstrative of the problems that can emerge with base implicitly setting environmental variables and other build-time arguments; it's much harder to control them directly from a port when you need something different.
>> 

and ask you to clarify your objection to this proposal.




More information about the macports-dev mailing list