Changeset 15438 in project for chicken


Ignore:
Timestamp:
08/13/09 18:36:10 (10 years ago)
Author:
felix winkelmann
Message:

reactivated SONAME, possibly messed everything up

Location:
chicken/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/Makefile.linux

    r13820 r15438  
    4343LINKER_LINK_SHARED_DLOADABLE_OPTIONS = -L. -shared -Wl,-R$(RUNTIME_LINKER_PATH)
    4444LINKER_LINK_SHARED_PROGRAM_OPTIONS = -Wl,-R$(RUNTIME_LINKER_PATH)
     45LIBCHICKEN_SO_LINKER_OPTIONS = -Wl,-soname,libchicken.so$(SONAME_VERSION)
     46LIBUCHICKEN_SO_LINKER_OPTIONS = -Wl,-soname,libuchicken.so$(SONAME_VERSION)
    4547LIBRARIES = -lm -ldl
    4648NEEDS_RELINKING = yes
     49USES_SONAME = yes
    4750
    4851# special files
  • chicken/trunk/eval.scm

    r15203 r15438  
    4848#ifndef C_INSTALL_SHARE_HOME
    4949# define C_INSTALL_SHARE_HOME NULL
     50#endif
     51
     52#ifndef C_BINARY_VERSION
     53# define C_BINARY_VERSION      4
    5054#endif
    5155<#
     
    9599(define-foreign-variable install-egg-home c-string "C_INSTALL_EGG_HOME")
    96100(define-foreign-variable installation-home c-string "C_INSTALL_SHARE_HOME")
     101(define-foreign-variable binary-version int "C_BINARY_VERSION")
    97102
    98103(define ##sys#core-library-modules
     
    113118(define-constant repository-environment-variable "CHICKEN_REPOSITORY")
    114119(define-constant prefix-environment-variable "CHICKEN_PREFIX")
    115 (define-constant default-binary-version 4)
    116120
    117121; these are actually in unit extras, but that is used by default
    118122; srfi-12 in unit library
    119 ; srfi-98 partically in unit posix
     123; srfi-98 partially in unit posix
    120124
    121125(define-constant builtin-features
     
    9991003
    10001004(define dynamic-load-libraries
    1001   (make-parameter
    1002    (map (cut ##sys#string-append <> ##sys#load-library-extension) ##sys#default-dynamic-load-libraries)
    1003    (lambda (x)
    1004      (##sys#check-list x)
    1005      x) ) )
     1005  (let ((complete
     1006         (let ((ext
     1007                (case (software-version)
     1008                  ((linux)
     1009                   (string-append
     1010                    ##sys#load-library-extension
     1011                    "."
     1012                    (number->string binary-version)))
     1013                  (else ##sys#load-library-extension))))
     1014           (cut ##sys#string-append <> ext))))
     1015    (make-parameter
     1016     (map complete ##sys#default-dynamic-load-libraries)
     1017     (lambda (x)
     1018       (##sys#check-list x)
     1019       x) ) ) )
    10061020
    10071021(define ##sys#load-library
     
    11221136(define ##sys#load-extension
    11231137  (let ((string->symbol string->symbol))
    1124     (lambda (id loc . err?)
     1138    (lambda (id loc #!optional (err? #t))
    11251139      (cond ((string? id) (set! id (string->symbol id)))
    11261140            (else (##sys#check-symbol id loc)) )
     
    11281142        (cond ((member p ##sys#loaded-extensions))
    11291143              ((memq id ##sys#core-library-modules)
    1130                (##sys#load-library id #f) )
     1144               (or (##sys#load-library id #f)
     1145                   (and err?
     1146                        (##sys#error loc "cannot load core library" id))))
    11311147              (else
    11321148               (let ([id2 (##sys#find-extension p #t)])
     
    11351151                        (set! ##sys#loaded-extensions (cons p ##sys#loaded-extensions))
    11361152                        #t)
    1137                        ((optional err? #t) (##sys#error loc "cannot load extension" id))
     1153                       (err? (##sys#error loc "cannot load extension" id))
    11381154                       (else #f) ) ) ) ) ) ) ) )
    11391155
     
    12191235                 (if comp?
    12201236                     `(##core#declare (uses ,id))
    1221                      `(##sys#load-library ',id #f) )
     1237                     `(load-library ',id #f) )
    12221238                 id #t)
    12231239                #t) )
     
    12311247                       (if comp?
    12321248                           `(##core#declare (uses ,id))
    1233                            `(##sys#load-library ',id #f) )
     1249                           `(load-library ',id #f) )
    12341250                       id #f))
    12351251                  #t) ) )
  • chicken/trunk/rules.make

    r15430 r15438  
    683683        $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_LIBRARY_OPTIONS) $(LIBCHICKEN_SO_LINKER_OPTIONS) \
    684684          $(LINKER_OUTPUT) $^ $(LIBCHICKEN_SO_LIBRARIES)
    685 
     685ifdef USES_SONAME
     686        ln -sf $(LIBCHICKEN_SO_FILE) $(LIBCHICKEN_SO_FILE).$(BINARYVERSION)
     687endif
    686688
    687689libuchicken$(SO): $(LIBUCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT)
    688690        $(LINKER) $(LINKER_OPTIONS) $(LINKER_LINK_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_LINKER_OPTIONS) \
    689691          $(LINKER_OUTPUT) $^ $(LIBUCHICKEN_SO_LIBRARIES)
     692ifdef USES_SONAME
     693        ln -sf $(LIBUCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE).$(BINARYVERSION)
     694endif
    690695
    691696cygchicken-0.dll: $(LIBCHICKEN_SHARED_OBJECTS) $(APPLY_HACK_OBJECT)
     
    811816        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_FILE) $(DESTDIR)$(IBINDIR)
    812817else
    813         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBCHICKEN_SO_FILE) $(DESTDIR)$(ILIBDIR)
    814         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_FILE) $(DESTDIR)$(ILIBDIR)
     818        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBCHICKEN_SO_FILE) \
     819          $(DESTDIR)$(ILIBDIR)/$(LIBCHICKEN_SO_FILE)$(SONAME_VERSION)
     820        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) $(LIBUCHICKEN_SO_FILE) \
     821          $(DESTDIR)$(ILIBDIR)/$(LIBCHICKEN_SO_FILE)$(SONAME_VERSION)
    815822endif
    816823ifdef WINDOWS
    817824        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_SHARED_LIBRARY_OPTIONS) libchickengui$(SO) $(DESTDIR)$(IBINDIR)
     825endif
     826ifeq ($(USES_SONAME),linux)
     827        cd $(DESTDIR)$(ILIBDIR)  && ln -sf $(LIBCHICKEN_SO_FILE).$(BINARYVERSION) libchicken$(SO)
     828        cd $(DESTDIR)$(ILIBDIR)  && ln -sf $(LIBUCHICKEN_SO_FILE).$(BINARYVERSION) libuchicken$(SO)
    818829endif
    819830endif
     
    839850          $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
    840851          $(CHICKEN_STATUS_PROGRAM)$(EXE) $(CHICKEN_SETUP_PROGRAM)$(EXE) \
     852          $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE) \
    841853          $(IMPORT_LIBRARIES:%=%.so) $(IMPORT_LIBRARIES:%=%.import.so)
    842         $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install
     854        $(MAKE) -f $(SRCDIR)Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) \
     855          SONAME_VERSION=.$(BINARYVERSION) install
    843856        $(MAKE_WRITABLE_COMMAND) $(CHICKEN_PROGRAM)$(EXE) $(CSI_PROGRAM)$(EXE) \
    844857          $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE)
Note: See TracChangeset for help on using the changeset viewer.