[60662] trunk/base/src/port1.0/portconfigure.tcl
Joshua Root
jmr at macports.org
Thu Nov 19 12:04:15 PST 2009
On 2009-11-20 07:00, Jeremy Huddleston wrote:
>>> 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"
>> Yes, but it's only doing the right thing for flags that are going to be
>> passed to a compiler. You can't do "ld -m64 ..."
>
> Ah, ok. I see what you were saying now...
>
> So then how does one tell a non-Apple ld what arch to target? Or is that not an option?
I don't think we care about non-Apple ld, so we can always use -arch if
the flag is in fact going to be passed straight to ld. The problem is
non-Apple gcc, which doesn't understand -arch. So we have to use
-m32/-m64 instead, which is fine to use in LDFLAGS if you link using
gcc, but not if you link with ld directly.
- Josh
More information about the macports-dev
mailing list