diff --git a/csc.scm b/csc.scm
index 4f3afe5..b88c261 100644
|
a
|
b
|
|
| 199 | 199 | (define default-shared-library-files (if msvc |
| 200 | 200 | (list (string-append "libchicken." library-extension)) |
| 201 | 201 | '("-lchicken"))) |
| | 202 | (define unsafe-libraries #f) |
| 202 | 203 | (define unsafe-library-files |
| 203 | 204 | (list |
| 204 | 205 | (quotewrap |
| … |
… |
|
| 209 | 210 | (define unsafe-shared-library-files (if msvc |
| 210 | 211 | (list (string-append "libuchicken." library-extension)) |
| 211 | 212 | '("-luchicken"))) |
| | 213 | (define (use-unsafe-libraries) |
| | 214 | (set! unsafe-libraries #t) |
| | 215 | (set! library-files unsafe-library-files) |
| | 216 | (set! shared-library-files unsafe-shared-library-files)) |
| | 217 | |
| 212 | 218 | (define gui-library-files default-library-files) |
| 213 | 219 | (define gui-shared-library-files default-shared-library-files) |
| 214 | 220 | (define library-files default-library-files) |
| … |
… |
EOF
|
| 639 | 645 | [(|-O5|) |
| 640 | 646 | (set! rest (cons* "-optimize-level" "5" rest)) |
| 641 | 647 | (t-options "-unsafe-libraries") |
| 642 | | (set! library-files unsafe-library-files) |
| 643 | | (set! shared-library-files unsafe-shared-library-files) |
| | 648 | (use-unsafe-libraries) |
| 644 | 649 | (when (memq (build-platform) '(mingw32 cygwin gnu)) |
| 645 | 650 | (set! compile-options |
| 646 | 651 | (cons* "-O3" "-fomit-frame-pointer" compile-options)) ) ] |
| … |
… |
EOF
|
| 685 | 690 | (set! rest (cdr rest)) ] |
| 686 | 691 | [(-unsafe-libraries) |
| 687 | 692 | (t-options arg) |
| 688 | | (set! library-files unsafe-library-files) |
| 689 | | (set! shared-library-files unsafe-shared-library-files) ] |
| | 693 | (use-unsafe-libraries) ] |
| 690 | 694 | [(-rpath) |
| 691 | 695 | (check s rest) |
| 692 | 696 | (when (eq? 'gnu (build-platform)) |
| … |
… |
EOF
|
| 699 | 703 | [else |
| 700 | 704 | (when (memq s '(-unsafe -benchmark-mode)) |
| 701 | 705 | (when (eq? s '-benchmark-mode) |
| 702 | | (set! library-files unsafe-library-files) |
| 703 | | (set! shared-library-files unsafe-shared-library-files) ) ) |
| | 706 | (use-unsafe-libraries) ) ) |
| 704 | 707 | (when (eq? s '-to-stdout) |
| 705 | 708 | (set! to-stdout #t) |
| 706 | 709 | (set! translate-only #t) ) |
| … |
… |
EOF
|
| 845 | 848 | (when (and osx (or (not cross-chicken) host-mode)) |
| 846 | 849 | (unless (zero? ($system |
| 847 | 850 | (string-append |
| 848 | | "install_name_tool -change libchicken.dylib " |
| | 851 | "install_name_tool -change lib" (if unsafe-libraries "u" "") "chicken.dylib " |
| 849 | 852 | (quotewrap |
| 850 | 853 | (make-pathname |
| 851 | 854 | (prefix "" "lib" |
| 852 | 855 | (if host-mode |
| 853 | 856 | INSTALL_LIB_HOME |
| 854 | 857 | TARGET_RUN_LIB_HOME)) |
| 855 | | "libchicken.dylib") ) |
| | 858 | (if unsafe-libraries "libuchicken.dylib" "libchicken.dylib")) ) |
| 856 | 859 | " " |
| 857 | 860 | target) ) ) |
| 858 | 861 | (exit last-exit-code) ) ) |