[33477] trunk/base/src/port1.0/portconfigure.tcl
afb at macports.org
afb at macports.org
Sun Jan 27 11:05:27 PST 2008
Revision: 33477
http://trac.macosforge.org/projects/macports/changeset/33477
Author: afb at macports.org
Date: 2008-01-27 11:05:24 -0800 (Sun, 27 Jan 2008)
Log Message:
-----------
add some code comments
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 17:48:39 UTC (rev 33476)
+++ trunk/base/src/port1.0/portconfigure.tcl 2008-01-27 19:05:24 UTC (rev 33477)
@@ -111,11 +111,10 @@
ui_msg "$UI_PREFIX [format [msgcat::mc "Configuring %s"] [option portname]]"
}
-#
-# internal functions to determine the "-arch xy" flags for the compiler
# -> these should preferably get a more global scope, perhaps be user-configurable?
set universal_archs {ppc i386}
+# internal function to determine the "-arch xy" flags for the compiler
proc configure_get_universal_archflags {args} {
global universal_archs
set flags ""
@@ -125,27 +124,33 @@
return $flags
}
+# internal function to determine the CPPFLAGS for the compiler
proc configure_get_universal_cppflags {args} {
global sysroot
set flags ""
+ # include sysroot in CPPFLAGS too (twice), for the benefit of autoconf
if {${sysroot} != ""} {
set flags "-isysroot ${sysroot}"
}
return $flags
}
+# internal function to determine the CFLAGS for the compiler
proc configure_get_universal_cflags {args} {
global sysroot
set flags [configure_get_universal_archflags]
+ # these flags should be valid for C/C++ and similar compiler frontends
if {${sysroot} != ""} {
set flags "-isysroot ${sysroot} ${flags}"
}
return $flags
}
+# internal function to determine the LDFLAGS for the compiler
proc configure_get_universal_ldflags {args} {
global sysroot os.platform os.arch os.version os.major
set flags [configure_get_universal_archflags]
+ # works around linking without using the CFLAGS, outside of automake
if {${os.arch} == "powerpc"} {
set flags "-Wl,-syslibroot,${sysroot} ${flags}"
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080127/0f9aac91/attachment.html
More information about the macports-changes
mailing list