[darwinbuild-changes] [389] trunk

source_changes at macosforge.org source_changes at macosforge.org
Wed Sep 24 14:58:24 PDT 2008


Revision: 389
          http://trac.macosforge.org/projects/darwinbuild/changeset/389
Author:   wsiegrist at apple.com
Date:     2008-09-24 14:58:24 -0700 (Wed, 24 Sep 2008)
Log Message:
-----------
Fix build problems on non-standard OSes and support more versions of gcc

Modified Paths:
--------------
    trunk/darwinbuild/installXcode31
    trunk/darwintrace/Makefile
    trunk/darwintrace/darwintrace.c

Modified: trunk/darwinbuild/installXcode31
===================================================================
--- trunk/darwinbuild/installXcode31	2008-09-19 22:08:26 UTC (rev 388)
+++ trunk/darwinbuild/installXcode31	2008-09-24 21:58:24 UTC (rev 389)
@@ -20,8 +20,14 @@
     
 BINSYMLINKS=( \
     gcc \
-    gcc-3.3 \
     gcc-4.0 \
+    gcc-4.2 \
+    gcov \
+    gcov-4.0 \
+    gcov-4.2 \
+    g++ \
+    g++-4.0 \
+    g++-4.2 \
     strip)
     
 

Modified: trunk/darwintrace/Makefile
===================================================================
--- trunk/darwintrace/Makefile	2008-09-19 22:08:26 UTC (rev 388)
+++ trunk/darwintrace/Makefile	2008-09-24 21:58:24 UTC (rev 389)
@@ -10,16 +10,17 @@
 all: darwintrace.dylib
 
 VERSION=$(shell uname -r | cut -f1 -d. )
-ifeq ($(VERSION), 9)
+ifeq ($(VERSION), 8)
+CFLAGS = -nostdlib
+else
 CFLAGS = -nodefaultlibs
-else
-CFLAGS = -nostdlib
 endif
 
+ARCHS=$(shell lipo -info /usr/lib/libSystem.dylib | cut -d : -f 3 | sed 's/ppc7400/ppc/' | awk '{ ORS=" "; for(i=1;i<=NF;i++) print "-arch", $$i}') 
 
 darwintrace.dylib: darwintrace.c
 	cc -o $(OBJROOT)/$@ \
-		-arch i386 -arch ppc -arch ppc64 \
+		$(ARCHS) \
 		-W -Wall -pedantic -std=c99 \
 		-flat_namespace \
 		-fno-common \

Modified: trunk/darwintrace/darwintrace.c
===================================================================
--- trunk/darwintrace/darwintrace.c	2008-09-19 22:08:26 UTC (rev 388)
+++ trunk/darwintrace/darwintrace.c	2008-09-24 21:58:24 UTC (rev 389)
@@ -43,18 +43,17 @@
 #include <sys/paths.h>
 #include <errno.h>
 
-#define DARWINTRACE_SHOW_PROCESS 0
 #define DARWINTRACE_LOG_FULL_PATH 1
 #define DARWINTRACE_DEBUG_OUTPUT 0
 
 #define START_FD 81
 static int __darwintrace_fd = -2;
 #define BUFFER_SIZE	1024
-#if DARWINTRACE_SHOW_PROCESS
+
 static char __darwintrace_progname[BUFFER_SIZE];
 static pid_t __darwintrace_pid = -1;
-#endif
 
+
 #if DARWINTRACE_DEBUG_OUTPUT
 #define dprintf(...) fprintf(stderr, __VA_ARGS__)
 #else
@@ -82,7 +81,7 @@
 		errno = olderrno;
 	  }
 	}
-#if DARWINTRACE_SHOW_PROCESS
+
 	if (__darwintrace_pid == -1) {
 		__darwintrace_pid = getpid();
 		char** progname = _NSGetProgname();
@@ -90,7 +89,7 @@
 			strcpy(__darwintrace_progname, *progname);
 		}
 	}
-#endif
+
 }
 
 /* __darwintrace_setup must have been called already */
@@ -100,13 +99,13 @@
   int size;
 
   size = snprintf(__darwintrace_buf, sizeof(__darwintrace_buf),
-#if DARWINTRACE_SHOW_PROCESS
+
 		  "%s[%d]\t"
-#endif
+
 		  "%s\t%s\n",
-#if DARWINTRACE_SHOW_PROCESS
+
 		  procname ? procname : __darwintrace_progname, __darwintrace_pid,
-#endif
+
 		  tag, path );
   
   write(fd, __darwintrace_buf, size);
@@ -333,10 +332,10 @@
 		/* we have liftoff */
 		if (interp && interp[0] != '\0') {
 		  const char* procname = NULL;
-#if DARWINTRACE_SHOW_PROCESS
+
 		  procname = strrchr(argv[0], '/') + 1;
 		  if (procname == NULL) procname = argv[0];
-#endif
+
 		  __darwintrace_cleanup_path(interp);
 
 		  __darwintrace_logpath(__darwintrace_fd, procname, "execve", interp);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/darwinbuild-changes/attachments/20080924/e160db1d/attachment.html 


More information about the darwinbuild-changes mailing list