removing -arch from LDFLAGS

David Strubbe dstrubbe at gmail.com
Mon Nov 11 22:25:11 PST 2013


Thanks. This isn't in the guide. Would be helpful to list in
http://guide.macports.org/#reference.phases.configure.

I think I should do "configure.ld_archflags " (i.e. set to blank) if the
compiler is gfortran. When you say "simply clearing it may break the port's
ability to build for the selected build_arch" are you saying this is still
not the way to go? If so, what do you suggest? Or did you mean clearing
LDFLAGS entirely? Or do you mean if I clear it always not just when using
gfortran?

Also, why didn't ${configure.args} work?

David


On Tue, Nov 12, 2013 at 1:08 AM, Joshua Root <jmr at macports.org> wrote:

> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20131112/e4d9991b/attachment-0001.html>


More information about the macports-dev mailing list