summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordas <das>2006-08-18 07:45:31 (GMT)
committerdas <das>2006-08-18 07:45:31 (GMT)
commitdaccfbf9d19d8ffcfd4c6106a608bf441713d5ff (patch)
tree580a77a48184c84c4261aa7b46888ee7b525fae4 /macosx
parent13abf0c4f482ad0481bb1945ff6451452535f47a (diff)
downloadtcl-daccfbf9d19d8ffcfd4c6106a608bf441713d5ff.zip
tcl-daccfbf9d19d8ffcfd4c6106a608bf441713d5ff.tar.gz
tcl-daccfbf9d19d8ffcfd4c6106a608bf441713d5ff.tar.bz2
* unix/tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for
universal builds including x86_64, for 64-bit CoreFoundation on Leopard and for use of -mmacosx-version-min instead of MACOSX_DEPLOYMENT_TARGET. * unix/configure: autoconf-2.59 * unix/tclConfig.h.in: autoheader-2.59 * generic/tcl.h: add fixes for building on Leopard and support * unix/tclUnixPort.h: for 64-bit CoreFoundation on Leopard. * macosx/tclMacOSXFCmd.c: * unix/tclUnixPort.h: on Darwin x86_64, disable use of vfork as it causes execve to fail intermittently. (rdar://4685553) * generic/tclTomMath.h: on Darwin 64-bit, for now disable use of 128-bit arithmetic through __attribute__ ((mode(TI))), as it leads to link errors due to missing fallbacks. (rdar://4685527) * macosx/Tcl.xcodeproj/project.pbxproj: add x86_64 to universal build, switch native release targets to use DWARF with dSYM, Xcode 3.0 changes. * macosx/README: updates for x86_64 and Xcode 2.3. * macosx/Tcl.xcodeproj/default.pbxuser: add test suite target that runs * macosx/Tcl.xcodeproj/project.pbxproj: the tcl test suite at build time and shows clickable test suite errors in the GUI build window. * tests/macOSXFCmd.test: fix use of deprecated resource fork paths. * unix/tclUnixInit.c (TclpInitLibraryPath): move code that is only needed when TCL_LIBRARY is defined to run only in that case. * generic/tclLink.c (LinkTraceProc): fix 64-bit signed-with-unsigned comparison warning from gcc4 -Wextra.
Diffstat (limited to 'macosx')
-rw-r--r--macosx/README21
-rw-r--r--macosx/Tcl.xcodeproj/default.pbxuser7
-rw-r--r--macosx/Tcl.xcodeproj/project.pbxproj106
-rw-r--r--macosx/tclMacOSXFCmd.c12
4 files changed, 131 insertions, 15 deletions
diff --git a/macosx/README b/macosx/README
index ed9382f..2917831 100644
--- a/macosx/README
+++ b/macosx/README
@@ -1,7 +1,7 @@
Tcl Mac OS X README
-----------------
-RCS: @(#) $Id: README,v 1.8 2006/07/21 06:02:48 das Exp $
+RCS: @(#) $Id: README,v 1.9 2006/08/18 07:45:31 das Exp $
This is the README file for the Mac OS X/Darwin version of Tcl.
@@ -94,9 +94,9 @@ take care to only use the project matching your DevTools and OS version:
target useful for debugging, this target's 'Development' buildstyle
has ZeroLink and Fix&Continue enabled, use the 'DevelNoFixZL' buildstyle
if you need a debug build without these features.
- * Tcl.xcodeproj for Xcode 2.2 on 10.4, this additionally has a
+ * Tcl.xcodeproj for Xcode 2.3 on 10.4, this additionally has a
'ReleaseUniversal'configuration which builds both the 'Tcl' and the
- 'tcltest' targets as universal binaries for ppc, ppc64 and i386.
+ 'tcltest' targets as universal binaries for ppc, ppc64, i386 and x86_64.
Notes about the native targets of the Xcode projects:
* the Xcode projects refer to the tcl source directory with a relative path
of ../../tcl to the project location, if your source directory is named
@@ -115,14 +115,15 @@ Notes about the native targets of the Xcode projects:
env vars AUTOCONF and AUTOHEADER to their true locations if necessary.
- To build universal binaries outside of Tcl.xcodeproj, set CFLAGS as follows:
- export CFLAGS="-arch ppc -arch ppc64 -arch i386 \
+ export CFLAGS="-arch ppc -arch ppc64 -arch i386 -arch x86_64 \
-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"
-This requires Mac OS X 10.4 and Xcode 2.2 (_not_ Xcode 2.1) and will work on any
-of the architectures (on intel Macs, the -isysroot is not required). Note that
-it is not possible to configure correctly if the current architecture is not
-present in CFLAGS (i.e. -arch `arch` must always be there). Universal builds of
-Tcl TEA extensions are also possible with CFLAGS set as above, they will be
-[load]able by universal as well as thin binaries of Tcl.
+This requires Mac OS X 10.4 and Xcode 2.3 (or Xcode 2.2 if -arch x86_64 is
+omitted, but _not_ Xcode 2.1) and will work on any of the architectures (on
+intel Macs, the -isysroot may not be required). Note that it is not possible to
+configure universal builds correctly if the current architecture is not present
+in CFLAGS (i.e. -arch `arch` must be there).
+Universal builds of Tcl TEA extensions are also possible with CFLAGS set as
+above, they will be [load]able by universal as well as thin binaries of Tcl.
- To enable weak-linking, set the MACOSX_DEPLOYMENT_TARGET environment variable
to the minimal OS version (>= 10.2) the binaries should be able to run on, e.g:
diff --git a/macosx/Tcl.xcodeproj/default.pbxuser b/macosx/Tcl.xcodeproj/default.pbxuser
index ebbcbec..5444995 100644
--- a/macosx/Tcl.xcodeproj/default.pbxuser
+++ b/macosx/Tcl.xcodeproj/default.pbxuser
@@ -30,10 +30,12 @@
NO,
NO,
NO,
+ NO,
);
argumentStrings = (
"${SRCROOT}/../../tcl/tests/all.tcl",
"-singleproc 1",
+ "-constraints newExprParser",
"-verbose \"bet\"",
);
autoAttachOnCrash = 1;
@@ -74,6 +76,11 @@
},
{
active = NO;
+ name = TCLLIBPATH;
+ value = /Library/Tcl;
+ },
+ {
+ active = NO;
name = DYLD_PRINT_LIBRARIES;
},
);
diff --git a/macosx/Tcl.xcodeproj/project.pbxproj b/macosx/Tcl.xcodeproj/project.pbxproj
index 9c72230..0028aa5 100644
--- a/macosx/Tcl.xcodeproj/project.pbxproj
+++ b/macosx/Tcl.xcodeproj/project.pbxproj
@@ -163,6 +163,16 @@
F9E61D32090A48FA002B3151 /* bn_mp_unsigned_bin_size.c in Sources */ = {isa = PBXBuildFile; fileRef = F96D42CC08F272B3004A47F5 /* bn_mp_unsigned_bin_size.c */; };
/* End PBXBuildFile section */
+/* Begin PBXContainerItemProxy section */
+ F97258D20A868C6F00096C78 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 08FB7793FE84155DC02AAC07 /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 8DD76FA90486AB0100D96B5E;
+ remoteInfo = tcltest;
+ };
+/* End PBXContainerItemProxy section */
+
/* Begin PBXFileReference section */
8DD76FB20486AB0100D96B5E /* tcltest */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = tcltest; sourceTree = BUILT_PRODUCTS_DIR; };
F966C07408F2820D005CB29B /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = /System/Library/Frameworks/CoreFoundation.framework; sourceTree = "<absolute>"; };
@@ -1837,6 +1847,21 @@
productReference = 8DD76FB20486AB0100D96B5E /* tcltest */;
productType = "com.apple.product-type.tool";
};
+ F97258A50A86873C00096C78 /* tests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = F97258A80A86873D00096C78 /* Build configuration list for PBXNativeTarget "tests" */;
+ buildPhases = (
+ F97258A40A86873C00096C78 /* ShellScript */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ F97258D30A868C6F00096C78 /* PBXTargetDependency */,
+ );
+ name = tests;
+ productName = tests;
+ productType = "com.apple.product-type.bundle";
+ };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
@@ -1846,14 +1871,29 @@
hasScannedForEncodings = 1;
mainGroup = 08FB7794FE84155DC02AAC07 /* Tcl */;
projectDirPath = "";
+ projectRoot = "";
targets = (
F9E61D16090A3E94002B3151 /* Tcl */,
8DD76FA90486AB0100D96B5E /* tcltest */,
+ F97258A50A86873C00096C78 /* tests */,
);
};
/* End PBXProject section */
/* Begin PBXShellScriptBuildPhase section */
+ F97258A40A86873C00096C78 /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/bash;
+ shellScript = "if [ \"${ACTION:-build}\" == \"build\" ]; then\nprintf '%s%s%s' '\npackage require tcltest 2.2\nnamespace import tcltest::*\nconfigure -testdir [file normalize {' \"${SRCROOT}\" '/../../tcl/tests}]\nconfigure -singleproc 1\nset b [info body ::tcltest::test]; set i [string first {puts [outputChannel] \"\\n====} $b]\nproc ::tcltest::test [info args ::tcltest::test] [string replace $b $i [expr {$i+27}] {set t [uplevel 1 {info script}]; set f [open $t r]; set n [expr {[lsearch -regex [split [read $f] \"\\n\"] \"^test [string map {. \\\\.} $name]\"]+1}]; close $f; puts [outputChannel] \"\\n$t:$n: test failed: $name [string trim $description]\\n====}]\nrunAllTests\n' | \"${TEST_RIG}\"; TEST_RIG_RESULT=$?\n[ ${TEST_RIG_RESULT} -ne 0 ] && echo \"tcltest:0: error: tcltest exited abnormally with code ${TEST_RIG_RESULT}.\"\nexit ${TEST_RIG_RESULT}\nfi";
+ };
F9A5C5F508F651A2008AE941 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -1871,7 +1911,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/bash;
- shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-/usr/bin/autoconf} && ${AUTOHEADER:-/usr/bin/autoheader}\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring tcl\"\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
+ shellScript = "## tcl configure shell script phase\n\ncd \"${TCL_SRCROOT}\"/macosx &&\nif [ configure.ac -nt configure -o ../unix/configure.in -nt configure -o ../unix/tcl.m4 -nt configure -o ../unix/aclocal.m4 -nt configure ]; then\n echo \"Running autoconf & autoheader in tcl/macosx\"\n rm -rf autom4te.cache\n ${AUTOCONF:-/usr/bin/autoconf} && ${AUTOHEADER:-/usr/bin/autoheader}\n rm -rf autom4te.cache\nfi\n\ncd \"${DERIVED_FILE_DIR}\" && mkdir -p tcl && cd tcl &&\nif [ \"${TCL_SRCROOT}\"/macosx/configure -nt config.status ]; then\n echo \"Configuring Tcl\"\n \"${TCL_SRCROOT}\"/macosx/configure --cache-file=../config.cache --prefix=${PREFIX} --bindir=${BINDIR} --libdir=${LIBDIR} --mandir=${MANDIR} --includedir=${INCLUDEDIR} --disable-shared ${CONFIGURE_ARGS}\nelse\n ./config.status\nfi\n";
};
/* End PBXShellScriptBuildPhase section */
@@ -2038,6 +2078,14 @@
};
/* End PBXSourcesBuildPhase section */
+/* Begin PBXTargetDependency section */
+ F97258D30A868C6F00096C78 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 8DD76FA90486AB0100D96B5E /* tcltest */;
+ targetProxy = F97258D20A868C6F00096C78 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
/* Begin XCBuildConfiguration section */
F91BCC4F093152310042A6BF /* ReleaseUniversal */ = {
isa = XCBuildConfiguration;
@@ -2060,10 +2108,12 @@
ppc,
ppc64,
i386,
+ x86_64,
);
BINDIR = "${PREFIX}/bin";
CONFIGURE_ARGS = "--enable-threads ${CONFIGURE_ARGS}";
DEAD_CODE_STRIPPING = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = YES;
GCC_DEBUGGING_SYMBOLS = full;
GCC_DYNAMIC_NO_PIC = YES;
@@ -2110,7 +2160,7 @@
F91BCC51093152310042A6BF /* ReleaseUniversal */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CFLAGS = "-arch ppc -arch ppc64 -arch i386 -isysroot ${SDKROOT} -mmacosx-version-min=10.4";
+ CFLAGS = "-arch ppc -arch ppc64 -arch i386 -arch x86_64 -isysroot ${SDKROOT} -mmacosx-version-min=10.4";
CONFIGURE_ARGS = "--disable-symbols";
GCC_PREPROCESSOR_DEFINITIONS = NDEBUG;
MACOSX_DEPLOYMENT_TARGET = 10.4;
@@ -2216,6 +2266,7 @@
BINDIR = "${PREFIX}/bin";
CONFIGURE_ARGS = "--enable-threads ${CONFIGURE_ARGS}";
DEAD_CODE_STRIPPING = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEPLOYMENT_POSTPROCESSING = YES;
GCC_DEBUGGING_SYMBOLS = full;
GCC_DYNAMIC_NO_PIC = YES;
@@ -2336,6 +2387,46 @@
};
name = DebugNoFixZL;
};
+ F97258A90A86873D00096C78 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = tests;
+ TCLTEST_OPTIONS = "-constraints newExprParser -verbose bet";
+ TCL_LIBRARY = "${SRCROOT}/../../tcl/library";
+ TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest";
+ };
+ name = Debug;
+ };
+ F97258AA0A86873D00096C78 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = tests;
+ TCLTEST_OPTIONS = "-constraints newExprParser -verbose bet";
+ TCL_LIBRARY = "${SRCROOT}/../../tcl/library";
+ TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest";
+ };
+ name = Release;
+ };
+ F97258AB0A86873D00096C78 /* DebugNoFixZL */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = tests;
+ TCLTEST_OPTIONS = "-constraints newExprParser -verbose bet";
+ TCL_LIBRARY = "${SRCROOT}/../../tcl/library";
+ TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest";
+ };
+ name = DebugNoFixZL;
+ };
+ F97258AC0A86873D00096C78 /* ReleaseUniversal */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = tests;
+ TCLTEST_OPTIONS = "-constraints newExprParser -verbose bet";
+ TCL_LIBRARY = "${SRCROOT}/../../tcl/library";
+ TEST_RIG = "$(OBJROOT)/$(CONFIGURATION)/tcltest";
+ };
+ name = ReleaseUniversal;
+ };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
@@ -2372,6 +2463,17 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Debug;
};
+ F97258A80A86873D00096C78 /* Build configuration list for PBXNativeTarget "tests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ F97258A90A86873D00096C78 /* Debug */,
+ F97258AA0A86873D00096C78 /* Release */,
+ F97258AB0A86873D00096C78 /* DebugNoFixZL */,
+ F97258AC0A86873D00096C78 /* ReleaseUniversal */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Debug;
+ };
/* End XCConfigurationList section */
};
rootObject = 08FB7793FE84155DC02AAC07 /* Project object */;
diff --git a/macosx/tclMacOSXFCmd.c b/macosx/tclMacOSXFCmd.c
index 51fe222..65352c2 100644
--- a/macosx/tclMacOSXFCmd.c
+++ b/macosx/tclMacOSXFCmd.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.9 2006/07/20 06:18:37 das Exp $
+ * RCS: @(#) $Id: tclMacOSXFCmd.c,v 1.10 2006/08/18 07:45:31 das Exp $
*/
#include "tclInt.h"
@@ -25,18 +25,24 @@
#ifdef HAVE_COPYFILE
#ifdef HAVE_COPYFILE_H
#include <copyfile.h>
-#else
+#if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040
+/* Support for weakly importing copyfile. */
+#define WEAK_IMPORT_COPYFILE
+extern int copyfile(const char *from, const char *to, copyfile_state_t state,
+ copyfile_flags_t flags) WEAK_IMPORT_ATTRIBUTE;
+#endif /* HAVE_WEAK_IMPORT */
+#else /* HAVE_COPYFILE_H */
int copyfile(const char *from, const char *to, void *state, uint32_t flags);
#define COPYFILE_ACL (1<<0)
#define COPYFILE_XATTR (1<<2)
#define COPYFILE_NOFOLLOW_SRC (1<<18)
-#endif /* HAVE_COPYFILE_H */
#if defined(HAVE_WEAK_IMPORT) && MAC_OS_X_VERSION_MIN_REQUIRED < 1040
/* Support for weakly importing copyfile. */
#define WEAK_IMPORT_COPYFILE
extern int copyfile(const char *from, const char *to, void *state,
uint32_t flags) WEAK_IMPORT_ATTRIBUTE;
#endif /* HAVE_WEAK_IMPORT */
+#endif /* HAVE_COPYFILE_H */
#endif /* HAVE_COPYFILE */
#include <libkern/OSByteOrder.h>