>From bc8fa77683e7116c027b81abef402a724e8fd8e9 Mon Sep 17 00:00:00 2001 From: Kristian Lein-Mathisen Date: Thu, 26 Apr 2018 23:10:26 +0200 Subject: [PATCH] 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 --- csc.scm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/csc.scm b/csc.scm index b3d562ab..27fbedb8 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))) @@ -939,7 +939,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 " -- 2.17.0