[60680] trunk/base/src/port1.0/portconfigure.tcl
jmr at macports.org
jmr at macports.org
Thu Nov 19 13:44:32 PST 2009
Revision: 60680
http://trac.macports.org/changeset/60680
Author: jmr at macports.org
Date: 2009-11-19 13:44:31 -0800 (Thu, 19 Nov 2009)
Log Message:
-----------
avoid putting -m32 or -m64 in LDFLAGS
Modified Paths:
--------------
trunk/base/src/port1.0/portconfigure.tcl
Modified: trunk/base/src/port1.0/portconfigure.tcl
===================================================================
--- trunk/base/src/port1.0/portconfigure.tcl 2009-11-19 21:40:35 UTC (rev 60679)
+++ trunk/base/src/port1.0/portconfigure.tcl 2009-11-19 21:44:31 UTC (rev 60680)
@@ -153,7 +153,9 @@
options configure.build_arch
default configure.build_arch {${build_arch}}
-foreach tool {cc cxx objc f77 f90 fc ld} {
+options configure.ld_archflags
+default configure.ld_archflags {[portconfigure::configure_get_ld_archflags]}
+foreach tool {cc cxx objc f77 f90 fc} {
options configure.${tool}_archflags
default configure.${tool}_archflags "\[portconfigure::configure_get_archflags $tool\]"
}
@@ -220,7 +222,7 @@
} elseif {[tbool configure.m32]} {
set flags "-m32"
} elseif {${configure.build_arch} != ""} {
- if {[arch_flag_supported] && ($tool == "cc" || $tool == "cxx" || $tool == "objc" || $tool == "ld")} {
+ if {[arch_flag_supported] && ($tool == "cc" || $tool == "cxx" || $tool == "objc")} {
set flags "-arch ${configure.build_arch}"
} elseif {${configure.build_arch} == "x86_64" || ${configure.build_arch} == "ppc64"} {
set flags "-m64"
@@ -231,6 +233,19 @@
return $flags
}
+# internal function to determine the ld flags to select an arch
+# Unfortunately there's no consistent way to do this when the compiler
+# doesn't support -arch, because it could be used to link rather than using
+# ld directly. So we punt and let portfiles deal with that case.
+proc portconfigure::configure_get_ld_archflags {args} {
+ global configure.build_arch
+ if {${configure.build_arch} != "" && [arch_flag_supported]} {
+ set flags "-arch ${configure.build_arch}"
+ } else {
+ return ""
+ }
+}
+
# internal function to determine the "-arch xy" flags for the compiler
proc portconfigure::configure_get_universal_archflags {args} {
global configure.universal_archs
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20091119/5dd5aff7/attachment.html>
More information about the macports-changes
mailing list