Ticket #150: csc.scm.patch

File csc.scm.patch, 1.8 KB (added by ddp, 14 years ago)

patch

  • csc.scm

    diff --git a/csc.scm b/csc.scm
    index 4f3afe5..c2e899e 100644
    a b  
    199199(define default-shared-library-files (if msvc
    200200                                         (list (string-append "libchicken." library-extension))
    201201                                         '("-lchicken")))
     202(define unsafe-libraries #f)
    202203(define unsafe-library-files
    203204  (list
    204205   (quotewrap
    EOF 
    639640               [(|-O5|)
    640641                (set! rest (cons* "-optimize-level" "5" rest))
    641642                (t-options "-unsafe-libraries")
     643                (set! unsafe-libraries #t)
    642644                (set! library-files unsafe-library-files)
    643645                (set! shared-library-files unsafe-shared-library-files)
    644646                (when (memq (build-platform) '(mingw32 cygwin gnu))
    EOF 
    685687                (set! rest (cdr rest)) ]
    686688               [(-unsafe-libraries)
    687689                (t-options arg)
     690                (set! unsafe-libraries #t)
    688691                (set! library-files unsafe-library-files)
    689692                (set! shared-library-files unsafe-shared-library-files) ]
    690693               [(-rpath)
    EOF 
    699702               [else
    700703                (when (memq s '(-unsafe -benchmark-mode))
    701704                  (when (eq? s '-benchmark-mode)
     705                        (set! unsafe-libraries #t)
    702706                    (set! library-files unsafe-library-files)
    703707                    (set! shared-library-files unsafe-shared-library-files) ) )
    704708                (when (eq? s '-to-stdout)
    EOF 
    845849    (when (and osx (or (not cross-chicken) host-mode))
    846850      (unless (zero? ($system
    847851                      (string-append
    848                        "install_name_tool -change libchicken.dylib "
     852                       "install_name_tool -change lib" (if unsafe-libraries "u" "") "chicken.dylib "
    849853                       (quotewrap
    850854                        (make-pathname
    851855                         (prefix "" "lib"
    852856                                 (if host-mode
    853857                                     INSTALL_LIB_HOME
    854858                                     TARGET_RUN_LIB_HOME))
    855                          "libchicken.dylib") )
     859                         (if unsafe-libraries "libuchicken.dylib" "libchicken.dylib")) )
    856860                       " "
    857861                       target) ) )
    858862        (exit last-exit-code) ) )