~ chicken-core (chicken-5) ffa2a9af8256b4b5c616affd3f377a5f9c7d859d


commit ffa2a9af8256b4b5c616affd3f377a5f9c7d859d
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Thu Feb 25 18:55:41 2010 +0100
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Thu Feb 25 18:55:41 2010 +0100

    bugfix in csc -deploy

diff --git a/README b/README
index f431ad8c..b2feeae9 100644
--- a/README
+++ b/README
@@ -178,6 +178,12 @@
 	  to make(1). Even simpler is editing the included "config.make"
 	  and just invoke make(1) without any extra parameters.
 
+        C_COMPILER=
+	  You can select an alternative compiler by setting this variable.
+	  The default compiler is "gcc". CHICKEN can be built with the
+	  LLVM version of gcc and with "clang", the LLVM-based C compiler,
+	  just set C_COMPILER to "llvm-gcc" or "clang".
+
         To remove CHICKEN from your file-system, enter (probably as
         root):
 
diff --git a/config.make b/config.make
index b8b4118c..bf45faf9 100644
--- a/config.make
+++ b/config.make
@@ -23,6 +23,9 @@
 # Enable GC of symbols:
 #SYMBOLGC=1
 
+# Use alternative C compiler
+#C_COMPILER=
+
 # Add additional C compiler options:
 #C_COMPILER_OPTIMIZATION_OPTIONS=...
 
diff --git a/csc.scm b/csc.scm
index 52f05546..2c32e381 100644
--- a/csc.scm
+++ b/csc.scm
@@ -676,7 +676,7 @@ EOF
 		(set! rest (cons* "-optimize-level" "5" rest))
 		(t-options "-unsafe-libraries")
 		(use-unsafe-libraries)
-		(when (memq (build-platform) '(mingw32 cygwin gnu))
+		(when (memq (build-platform) '(mingw32 cygwin gnu clang))
 		  (set! compile-options 
 		    (cons* "-O3" "-fomit-frame-pointer" compile-options)) ) ]
 	       [(-d0) (set! rest (cons* "-debug-level" "0" rest))]
@@ -723,7 +723,7 @@ EOF
 		(use-unsafe-libraries) ]
 	       [(-rpath)
 		(check s rest)
-		(when (eq? 'gnu (build-platform))
+		(when (memq (build-platform) '(gnu clang))
 		  (set! link-options (append link-options (list (string-append "-Wl,-R" (car rest)))))
 		  (set! rest (cdr rest)) ) ]
 	       [(-host) #f]
@@ -876,8 +876,8 @@ EOF
       (set! target (quotewrap target-filename))
       (unless (directory-exists? targetdir)
 	(when verbose
-	(print "mkdir " targetdir)
-	(create-directory targetdir))) )
+	  (print "mkdir " targetdir))
+	(create-directory targetdir)))
     (command
      (string-intersperse 
       (cons* (cond (cpp-mode c++-linker)
@@ -902,7 +902,7 @@ EOF
 	target) )
       (when (and gui (not deploy))
 	(rez target)))
-    (when deploy
+    (when (and deploy (not (or static static-libs)))
       (copy-libraries 
        (if (and osx gui)
 	   (make-pathname targetdir "Contents/MacOS")
Trap