This is the second half of 934eecc, re-applied. The symptom is the same as in that commit (the static linking tests failing), and the fix is also more or less the same (passing "-static -lchicken" and letting the linker sort out the path to libchicken.a).
Fixes #1366. --- csc.scm | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/csc.scm b/csc.scm index 5724b0cc..affa02e5 100644 --- a/csc.scm +++ b/csc.scm @@ -216,14 +216,10 @@ (if host-mode host-libs default-libs)) (define (default-library-files) - (list (string-append (if host-mode host-libdir default-libdir) - (string-append "/" (default-library))))) - -(define (default-shared-library-files) (list (string-append "-l" (if host-mode INSTALL_LIB_NAME TARGET_LIB_NAME)))) (define (library-files) (default-library-files)) -(define (shared-library-files) (default-shared-library-files)) +(define (shared-library-files) (default-library-files)) (define translate-options '()) @@ -600,10 +596,10 @@ EOF (when osx (set! compile-options (cons "-no-cpp-precomp" compile-options))) ] [(-objc) (set! objc-mode #t) ] - [(-static) - (set! translate-options - (cons "-static" translate-options)) - (set! static #t) ] + [(-static) + (set! translate-options (cons "-static" translate-options)) + (set! link-options (cons "-static" link-options)) + (set! static #t)] [(-cflags) (set! inquiry-only #t) (set! show-cflags #t) ] -- 2.11.0 _______________________________________________ Chicken-hackers mailing list Chicken-hackers@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-hackers