Use configure.ldflags-delete instead of configure.ldflags?
Gellule Xg
gellule.xg at free.fr
Mon Mar 14 17:29:24 PDT 2011
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, replacing
default configure.ldflags by:
default configure.ldflags {"-L${prefix}/lib -Xlinker
-headerpad_max_install_names"}
This would help with the use of install_name_tool to relocate
libraries produced by macports. I understand that macports results are
not meant to be relocated.
However, a few ports erase configure.ldflags in the Portfile definition
by using configure.ldflags set to empty. This is case for e.g. libiconv.
For this Port, the reason for this is described in
https://trac.macports.org/changeset/33625: "libiconv: make it possible
to build a universal libiconv even when a non-universal libiconv is
already active." Looking through the comments, it seems that:
configure.ldflags-delete -L${prefix}/lib would be sufficient. (And for
symmetry, configure.cppflags-delete -I${prefix}/include)
There are other reasons for removing -I${prefix}/include and
-L${prefix}/lib, that use a set configure.ldflags or configure.cppflags
to empty. They could maybe be replaced by a configure.ldflags-delete or
configure.cppflags-delete as well.
Is that something (the replacement of configure.ldflags by
configure.ldflags-delete, and its cpp flags equivalent) macport would
consider?
How about the addition of "-Xlinker -headerpad_max_install_names" as a
default in portconfigure.tcl? Would macport consider it?
Regards,
-Gellule/Julien
More information about the macports-dev
mailing list