removing -arch from LDFLAGS

Joshua Root jmr at macports.org
Mon Nov 11 22:08:25 PST 2013


On 2013-11-12 16:32 , David Strubbe wrote:
> Hi all,
> 
> Is there a way to remove the -arch option from LDFLAGS, as for gfortran?
> Using configure.compiler macports-gcc-XX removes it, but that is not
> compatible with the Fortran recipe which only sets configure.f90 etc. On
> my machine, the default value is
> 
> LDFLAGS='-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64'
> 
> I can use
> 
> configure.args-append  LDFLAGS=""
> 
> to clear LDFLAGS entirely, but it may better to just remove the -arch
> part. However, putting configure.ldflags-delete -arch x86_64, either in
> the main part of the Portfile, or in a pre-configure block, has no
> effect, because at that point if I write out configure.ldflags it is
> only "-L/opt/local/lib -Wl,-headerpad_max_install_names", and if I try
> to write out configure.args, I get
> 
> Error: org.macports.configure for port libxc returned: can't read
> "configure.args": no such variable
> 
> What is the best approach here?

The option you want is configure.ld_archflags. Note that simply clearing
it may break the port's ability to build for the selected build_arch.
The corresponding option used for +universal is configure.universal_ldflags.

- Josh


More information about the macports-dev mailing list