~ chicken-core (chicken-5) d8545a630dfcd7f55756ddd6be9080b3aa7d61d1
commit d8545a630dfcd7f55756ddd6be9080b3aa7d61d1
Author: Kristian Lein-Mathisen <kristian@adellica.com>
AuthorDate: Thu Apr 26 23:10:26 2018 +0200
Commit: Peter Bex <peter@more-magic.net>
CommitDate: Sun May 13 15:07:06 2018 +0200
Always build in host mode unless cross-compiling
When building with a prefix or suffix, compiling with csc fails. The
include paths and library name are wrong because they use the
suffix-less C_TARGET_INCLUDE_HOME and C_TARGET_LIB_NAME variables.
Signed-off-by: Kooda <kooda@upyum.com>
Signed-off-by: Peter Bex <peter@more-magic.net>
diff --git a/csc.scm b/csc.scm
index 0cd62b7c..c9d7c969 100644
--- a/csc.scm
+++ b/csc.scm
@@ -76,8 +76,8 @@
(exit 64) )
(define arguments (command-line-arguments))
-(define host-mode (member "-host" arguments))
(define cross-chicken (feature? #:cross-chicken))
+(define host-mode (or (not cross-chicken) (member "-host" arguments)))
(define (back-slash->forward-slash path)
(if windows-shell
@@ -287,9 +287,9 @@
;;; Locate object files for linking:
(define (repo-path)
- (if (and cross-chicken (not host-mode))
- (destination-repository 'target)
- (repository-path)))
+ (if host-mode
+ (repository-path)
+ (destination-repository 'target)))
(define (find-object-file name)
(let ((o (make-pathname #f name object-extension)))
@@ -943,7 +943,7 @@ EOF
(list (string-append link-output-flag (quotewrap target-filename))
(linker-options)
(linker-libraries) ) ) ) ) )
- (when (and osx (or (not cross-chicken) host-mode))
+ (when (and osx host-mode)
(command
(string-append
POSTINSTALL_PROGRAM " -change " (libchicken) ".dylib "
Trap