[60662] trunk/base/src/port1.0/portconfigure.tcl

Jeremy Huddleston jeremyhu at macports.org
Thu Nov 19 11:44:18 PST 2009


On Nov 19, 2009, at 10:07, Joshua Root wrote:

> On 2031-9-15 05:59, jeremyhu at macports.org wrote:
>> Revision: 60662
>>          http://trac.macports.org/changeset/60662
>> Author:   jeremyhu at macports.org
>> Date:     2009-11-19 09:34:26 -0800 (Thu, 19 Nov 2009)
>> Log Message:
>> -----------
>> Set LDFLAGS when changing build_arch.
> 
> I didn't do this in the first place because I wasn't sure if there would
> be a problem with ports using non-Apple compilers, which would have -m32
> or -m64 in LDFLAGS, and could end up calling ld with those flags
> directly. Do you think this will be rare enough that it won't be a
> problem to just fix up the few affected portfiles?

I did it to fix a build issue with firefox-x11-devel.  I expected that setting the configure.build_arch would be sufficient, and I was surprised to see that it didn't set LDFLAGS as I expected.

As for "non-Apple toolchains" ... isnt' that what [arch_flag_supported] is designed to handle in this hunk:

@@ -220,7 +220,7 @@
    } elseif {[tbool configure.m32]} {
        set flags "-m32"
    } elseif {${configure.build_arch} != ""} {
-        if {[arch_flag_supported] && ($tool == "cc" || $tool == "cxx" || $tool == "objc")} {
+        if {[arch_flag_supported] && ($tool == "cc" || $tool == "cxx" || $tool == "objc" || $tool == "ld")} {
            set flags "-arch ${configure.build_arch}"
        } elseif {${configure.build_arch} == "x86_64" || ${configure.build_arch} == "ppc64"} {
            set flags "-m64"


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3333 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20091119/d4a03297/attachment-0001.bin>


More information about the macports-dev mailing list