Re: [33483] trunk/base/src/port1.0/portconfigure.tcl
On Jan 27, 2008, at 14:40, afb@macports.org wrote:
Revision: 33483 http://trac.macosforge.org/projects/macports/changeset/33483 Author: afb@macports.org Date: 2008-01-27 12:40:10 -0800 (Sun, 27 Jan 2008)
Log Message: ----------- set canonical system name, for universal configure
Modified Paths: -------------- trunk/base/src/port1.0/portconfigure.tcl
Modified: trunk/base/src/port1.0/portconfigure.tcl =================================================================== --- trunk/base/src/port1.0/portconfigure.tcl 2008-01-27 20:32:06 UTC (rev 33482) +++ trunk/base/src/port1.0/portconfigure.tcl 2008-01-27 20:40:10 UTC (rev 33483) @@ -116,9 +116,23 @@ ui_msg "$UI_PREFIX [format [msgcat::mc "Configuring %s"] [option portname]]" }
+# internal function to determine canonical system name for configure +proc configure_get_universal_system_name {args} { + global configure.universal_target + switch -- ${configure.universal_target} { + "10.4" { return "i686-apple-darwin8" } + "10.5" { return "i686-apple-darwin9" } + } + return "" +} + # internal function to determine the universal args for configure.cmd proc configure_get_universal_args {args} { + set system [configure_get_universal_system_name] set params "--disable-dependency-tracking" + if {[info exists system] && $system != ""} { + set params "$params --host=${system} --target=${system}" + } return $params }
This works on PowerPC Macs too? What problem does this solve? Just curious.
Ryan Schmidt wrote:
This works on PowerPC Macs too?
Sortof. It works OK when building the default i386+ppc archs, but if one wants to build a single "ppc" arch then it should probably be changed into "powerpc-apple-darwin#" instead... Something which is actually rather fun to have around, as it can then build for earlier Mac OS X releases using the SDKs. (Will probably add 10.1-10.3 for completeness, and geek fun) But for the regular UB case it doesn't matter, since the Universal Binaries will run on both platforms anyway... Probably needs to be fixed for the "build twice and merge"
What problem does this solve? Just curious.
It solves the (pretty rare) case where you have the configure scripts cue off the current system name... For instance, when they look for "*-*-darwin9*" and then do something Leopardy ? So when compiling using the 10.4u.sdk on Leopard (for instance), one needs to tell ./configure that we're actually targetting an earlier release (also works for 10.1-10.3, as per above) Otherwise, it will run with `/usr/share/libtool/config.guess` --anders
participants (2)
-
Anders F Björklund
-
Ryan Schmidt