1. 01 Aug, 2010 8 commits
  2. 31 Jul, 2010 10 commits
    • rtoy's avatar
      Since it's about time, and while we're doing the cross-compile anyway, · 472cf0e6
      rtoy authored
      let's update the fasl version to 20b.
      
      To build this, use boot-2010-07-1-cross as the cross-compile script
      and -B src/bootfiles/20a/boot-2010-07-1.lisp for cross-build-world.sh.
      
      If there are any restarts, choose the clobber-it restart.
      
      bootfiles/20a/boot-20b.lisp:
      o Bootstrap the change to fasl version 20b.
      
      bootfiles/20a/boot-2010-07-1.lisp:
      o Load boot-20b.lisp.
      
      compiler/byte-comp.lisp:
      o Update byte-fasl-file-version to 20b.
      472cf0e6
    • rtoy's avatar
      Fix typos, clarify a few items. · 2ea6374f
      rtoy authored
      2ea6374f
    • rtoy's avatar
      o Forgot to add :executable to save-lisp signature. · d78815da
      rtoy authored
      o Give example of how to start an executable image.
      o Document the ld-library-path, modules, and ext-formats searc-lists.
      d78815da
    • rtoy's avatar
      Put back the segment address for Darwin. If we don't, vmmap prints · 27906b13
      rtoy authored
      error messages about being unable being unable to read zones for
      malloc.  Don't know if that's a bug in vmmap or not, but that doesn't
      sound good, and the message go away if we define seg addresses again.
      27906b13
    • rtoy's avatar
      For Linux and Darwin, we don't actually need to set the starting · 17a01e38
      rtoy authored
      address of the core sections.  In map_core_sections, we can map them
      to the correct addresses, just like we do on Solaris.
      
      lisp/elf.c:
      o Mmap the Lisp core sections with the correct address, not using the
        one in the executable itself, just like on Solaris.
      
      lisp/mach-o.c:
      o Add the array of addresses of the dynamic, static, and read-only
        spaces.
      o Mmap the Lisp core sections with the correct address, not using the
        one in the executable itself, just like on Solaris.
      o Small update to print out the names of the spaces, just like for elf
        files.
      
      tools/linker-x86.sh:
      o Don't need to tell the linker the starting addresses of the sections
        anymore for Linux and Darwin.  map_core_sections handles that.
      17a01e38
    • rtoy's avatar
      Update with executable image info. · bbb63fe2
      rtoy authored
      bbb63fe2
    • rtoy's avatar
      Update how executable images are done on Solaris to match Linux and · 1424559e
      rtoy authored
      Darwin.
      
      lisp/elf.h:
      o Solaris can use linux-x86.sh too.  (Need to rename this someday!)
      
      lisp/elf.c:
      o Use same command line for sparc as for linux.
      
      lisp/lisp.c:
      o Setup up initial_function the same way as on linux.
      
      tools/linker-x86.sh:
      o Add -rdynamic or -Bdynamic as needed.
      o Add support for Solaris using Sun C.
      1424559e
    • rtoy's avatar
      Only install the cmucl linker script if it exists. · e4b9dc20
      rtoy authored
      e4b9dc20
    • rtoy's avatar
      More cleanups. · 3db8a2bf
      rtoy authored
      o Disable all of those debugging prints.
      o Add ability to enable those debugging prints if desired.  (May go a
        way some day.)
      o Get rid of some compiler warnings.
      o Get rid of the global eh variable; it's not required to be global.
      3db8a2bf
    • rtoy's avatar
      Some cleanup of the names of main functions for creating executable · 35bcce9b
      rtoy authored
      images.
      
      lisp/elf.c:
      o Change write_elf_object, elf_cleanup, and elf_run_linker to
        write_space_object, obj_cleanup, and obj_run_linker.
      
      lisp/elf.h:
      o Update so that this can used for both elf and mach-o.  Not great,
        but I don't want to rename this file.
      
      lisp/mach-o.c:
      o Include elf.h
      o Remove items that are defined in elf.h.
      o Change function names from elf to mach_o.
      
      lisp/save.c:
      o Update names to new ones.
      35bcce9b
  3. 30 Jul, 2010 2 commits
    • rtoy's avatar
      First cut at executable images on Darwin/x86. The resulting · dc8b7cc2
      rtoy authored
      executable appears to work!
      
      bootfiles/20a/boot-2010-07-1.lisp:
      o Add :executable for darwin/x86.
      
      code/bsd-os.lisp:
      o Make :elf and :mach-o runtime features too.
      o Register :executable of :executable is defined.
      
      lisp/Config.x86_darwin:
      o Need mach-o.c
      o Add exec-final.c
      
      lisp/lisp.c:
      o Don't include elf.h if we're on Darwin since Darwin uses Mach-O, not
        ELF.
      o For Darwin, we get the initial function address from
        initial_function_addr, not from &initial_function_addr, like for
        Linux.
      
      lisp/save.c
      o Don't include libgen.h and elf.h on Darwin.
      
      tools/linker-x86.sh:
      o Update to support Darwin.
      
      tools/make-main-dist.sh:
      o Add support for executables on Darwin.
      
      lisp/mach-o.c:
      o Initial support for writing Mach-O files for the Lisp spaces.
      o Initial support for reading a Mach-O executable to find and map the
        Lisp spaces.
      dc8b7cc2
    • rtoy's avatar
      Some cleanup for Linux executables. The value of the · a5cd2c4f
      rtoy authored
      initial_function_addr is saved to a file and compiled in when linking
      the executable.  This makes building the executable more portable.
      All that's need is a way for gcc to link all of lisp.a and to set the
      starting address of some segments.
      
      lisp/lisp.c:
      o For Linux, use the value of initial_function_addr instead of the
        address.
      
      tools/linker-x86.sh:
      o Disable -x option, unless CMU_DEBUG_LINKER is not empty.
      o Instead of using --defsym feature of GNU ld, save the initial
        function address in a file to be compiled when making the
        executable.
      
      lisp/elf.c:
      o Remove printing of the sizeof elf headers
      o Print some info about the object being written and print somewhat
        neatly.
      
      lisp/save.c:
      o Rework printing info of the core objects.  Let write_elf_object do
        it.
      a5cd2c4f
  4. 29 Jul, 2010 4 commits
    • rtoy's avatar
      New linker shell script to build cmucl executables for Linux/x86. · 2ef841f9
      rtoy authored
      Could probably also work for FreeBSD, but changes not done yet.
      2ef841f9
    • rtoy's avatar
      Change how we build executables for Linux. We no longer need the · 3a882467
      rtoy authored
      hairy and fragile linker script.  Instead, we can use regular old gcc
      to do what we need.
      
      (Should also work for FreeBSD, but not yet implemented.)
      
      lisp/elf.c:
      o Include validate.h so we can get the starting addresses of the
        read-only, static, and dynamic spaces.
      o Add special case for linux to run the linker script correctly.
      
      lisp/elf.h:
      o There's a separate linker script for Linux.
      
      lisp/save.c:
      o Temporarily don't run elf_cleanup so we can have easier
        testing/debugging.
      
      tools/linker.sh:
      o Don't need BIFLAG anymore.
      
      tools/make-main-dist.sh:
      o Install linker-x86.sh.
      3a882467
    • rtoy's avatar
      Config.x86_linux: · 8760ca06
      rtoy authored
      o Define EXEC_FINAL_OBJ for linux, just like we did for Solaris so
        that we have a nice known good address and value for
        builtin_image_flag.
      
      GNUmakefile:
      o If EXEC_FINAL_OBJ has a value, remove exec-init.o from the library
        and add exec-final.o.  This makes it independent of the
        architecture.
      8760ca06
    • rtoy's avatar
      Change how Solaris executables set up builtin_image_flag. Instead of · a02cb5b1
      rtoy authored
      having the address of builtin_image_flag set to some (random) address
      of mapped memory that is non-zero, we add a special file to lisp.a
      that defines builtin_image_flag to 1.
      
      lisp/Config.sparc_common:
      o Define EXEC_FINAL_OBJ
      
      lisp/GNUmakefile:
      o Make lisp.a depend on EXEC_FINAL_OBJ
      o On Solaris, add EXEC_FINAL_OBJ to lisp.a.
      
      tools/SunOS-cmucl-linker-script:
      o Remove the line setting the address of builtin_image_flag.
      
      tools/linker.sh:
      o For Solaris, we don't need to define BIFLAG; the builtin_image_flag
        is automatically set correctly by linking in lisp.a
      a02cb5b1
  5. 28 Jul, 2010 1 commit
  6. 27 Jul, 2010 2 commits
    • rtoy's avatar
      Update previous change for sparc. · 6f05927d
      rtoy authored
      6f05927d
    • rtoy's avatar
      lisp/elf.c: · 05987e91
      rtoy authored
      o Print out the size of Elf_Ehdr and Elf32_Phdr, for debugging.
      o Pass the address of main to the linker script.  We will use the
        first word of main as the address of builtin_image_flag.  It seems
        highly unlikely that this would have have the value 0.
      
      tools/Linux-cmucl-linker-script:
      o Hardwire the value of SIZEOF_HEADERS.  This is needed on Debian to
        get the right number of segments.
      o Comment out some items and/or fix them so that Debian's linker
        doesn't complain.  Doesn't appear to do any harm on openSuSE 11.2.
      
      tools/linker.sh:
      o Update for the additional argument for the address of main to use as
        the address of builtin_image_flag.
      05987e91
  7. 26 Jul, 2010 5 commits
    • rtoy's avatar
      The generated linker script was placed in the wrong directory and ld · 4c219cf6
      rtoy authored
      could not find it.  Put it in the same directory as executable, and
      delete it when done.
      4c219cf6
    • rtoy's avatar
      Executables are working on Linux again. · 1495a87c
      rtoy authored
      1495a87c
    • rtoy's avatar
      compiler/fndb.lisp: · 2164678a
      rtoy authored
      o Tell compiler that the :allocation option to make-array only takes
        nil and :malloc.
      
      code/array.lisp:
      o Add declaration for :allocation to make-array so that we can catch
        invalid values for :allocation.
      o Add variable *debug-static-array-p* to enable debugging messages
        when GC'ing static arrays.
      2164678a
    • rtoy's avatar
      o Fix a really stupid newbie C mistake in maybe_static_array_p where a · 83376964
      rtoy authored
        break was missing.
      o Add variablle debug_static_array_p so we can disable debugging
        messages by default, but allow the user to enable the debugging
        messages.
      o Debugging messages for GC'ing static arrays are enabled if
        debug_static_array_p is true.
      83376964
    • rtoy's avatar
      Make executables work again on Linux. (At least on openSuSE 11.2). · bf794a29
      rtoy authored
      lisp/lisp.c:
      o Apparently tzset can call malloc on openSuSE 11.2.  This messes up
        mapping the dynamic space on executables because the heap appears to
        be allocated at the same place as the dynamic space.  Move tzset to
        the very end, after the Lisp spaces have been mapped.
      
      tools/Linux-cmucl-linker-script:
      o Update the linker script from the default version on openSuSE 11.2.
      bf794a29
  8. 23 Jul, 2010 2 commits
    • rtoy's avatar
      In the vops realpart/complex-double-float and · 3b1cf7c1
      rtoy authored
      realpart/complex-single-float, remove the unused temp register.
      Change the xor temp temp instruction to xor r r instruction so that
      the result has zeroes in the unused parts of the register.
      
      Bug and fix from Alexander Donkov.
      3b1cf7c1
    • rtoy's avatar
      Fix long-standing compiler error when cross-compiling the new · 31a8c798
      rtoy authored
      compiler.  There are errors about undefined FIXUP-CODE-OBJECT and
      SANCTIFY-FOR-EXECUTION functions when compiling generic/core.lisp.
      
      This allows the cross-compiling compiler to use the -batch flag.
      31a8c798
  9. 22 Jul, 2010 1 commit
  10. 21 Jul, 2010 4 commits
  11. 20 Jul, 2010 1 commit