Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OCaml 5.2 #134

Open
wants to merge 87 commits into
base: main
Choose a base branch
from
Open

Support OCaml 5.2 #134

wants to merge 87 commits into from

Commits on May 31, 2024

  1. Add -Wl,--start-group & -Wl,--end-group

    It's probably a better way to add libraries when we link objects from
    OCaml. With these options, we allow the linker to resolve all symbols
    regardless the order of these libraries. Indeed, the linker will
    repeatly lookup on these libraries until all symbols are resolved.
    
    However, it seems that these options can have an impact about
    performances of the linker. If we need to improve this situation, we
    must recalculate a topological order of libraries. But for our purpose,
    that's probably fine.
    
    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    a894db6 View commit details
    Browse the repository at this point in the history
  2. Delete the usage of sed -i (and replace it by sed && mv)

    `sed -i` is not POSIX, it's better to generate a `*.sed` file and move
    it to the real destination.
    
    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    d580220 View commit details
    Browse the repository at this point in the history
  3. Specify the architecture into the OCaml's ./configure script

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    f3a91fa View commit details
    Browse the repository at this point in the history
  4. Add $$PTHREAD_LIB into our pattern to modify nativecclibs

    With OCaml 5, the pattern was updated and has $$PTHREAD_LIB. We update
    accordingly.
    
    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    31bd923 View commit details
    Browse the repository at this point in the history
  5. Add runtime/primitives as a dependency for the coldstart rule

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    aeb1b7d View commit details
    Browse the repository at this point in the history
  6. ocamlrun{,d,i} are located into the runtime directory

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    5d551fc View commit details
    Browse the repository at this point in the history
  7. Delete fake libcamlrun{,d,i}.a from the Makefile

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    26c9f4d View commit details
    Browse the repository at this point in the history
  8. /runtime/Makefile was deleted (OCaml 5.0) and everything is into /Mak…

    …efile
    
    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    40f0c2f View commit details
    Browse the repository at this point in the history
  9. Replace ocamlyacc by $$(ocamlyacc_PROGRAM)

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    3886e3c View commit details
    Browse the repository at this point in the history
  10. Replace the number of domains into our OCaml runtime

    Currently, OCaml 5.0 wants to create 128 domains which requires a big
    allocation. We decided to allow the usage of only 1 domain.
    
    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    ee17f73 View commit details
    Browse the repository at this point in the history
  11. Disable debug runtime

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    da1b4f0 View commit details
    Browse the repository at this point in the history
  12. Delete unecessary tweak Makefile rule about objinfo_helper

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    9c12de1 View commit details
    Browse the repository at this point in the history
  13. Add a missing / into our nolibc's test-include/%.c rule

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    d74bf80 View commit details
    Browse the repository at this point in the history
  14. Add the -p option when we use mkdir (nolibc's Makefile)

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    a0b346a View commit details
    Browse the repository at this point in the history
  15. Set NATIVE_COMPILER to true into the OCaml's Makefile.config

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    217d7fb View commit details
    Browse the repository at this point in the history
  16. Add test-include/sys/ as a dependency for test-headers (nolibc's Make…

    …file)
    
    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    5f6bfca View commit details
    Browse the repository at this point in the history
  17. Define EBUSY

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    b5db5ce View commit details
    Browse the repository at this point in the history
  18. Define O_RDWR

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    be0aad0 View commit details
    Browse the repository at this point in the history
  19. Define SIG_BLOCK/SIG_SETMASK

    Initially, we used NULL and it seems that these values are used by GMP.
    We probably break something here if NULL <> 0 but conventionally,
    NULL = 0.
    
    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    f4f52a2 View commit details
    Browse the repository at this point in the history
  20. Define S_{IR,IW}USR

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    34bc918 View commit details
    Browse the repository at this point in the history
  21. Stub pthread

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    269d9c0 View commit details
    Browse the repository at this point in the history
  22. Stub sigfillset

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    d6c2e0f View commit details
    Browse the repository at this point in the history
  23. Stub fputs, fopen and fclose and implement puts and putchar

    As usual, we stub fputs, fopen and fclose which manipulate file
    description (and they don't exist with Solo5). However, puts and putchar
    use stdout and we decided to implement them (they will write _via_ Solo5
    into stderr).
    
    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    f052909 View commit details
    Browse the repository at this point in the history
  24. Stub strerror_r

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    23b4ec5 View commit details
    Browse the repository at this point in the history
  25. Stub ftruncate

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    7af0209 View commit details
    Browse the repository at this point in the history
  26. Stub usleep

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    1726bba View commit details
    Browse the repository at this point in the history
  27. Export stdrup & strcpy

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    cd593ac View commit details
    Browse the repository at this point in the history
  28. Export qsort and mktemp

    Note that these functions are not stubbed but they are just exported.
    They are probably not needed by the OCaml runtime but needed by the way
    to build OCaml.
    
    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    2863bd9 View commit details
    Browse the repository at this point in the history
  29. Export fstat

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    2c63b4b View commit details
    Browse the repository at this point in the history
  30. Export islanum and tolower

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    11e978c View commit details
    Browse the repository at this point in the history
  31. Add longjmp & setjmp

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    d6c7ed4 View commit details
    Browse the repository at this point in the history
  32. Add the sched.h interface (and the CPU_ZERO value)

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    3f40660 View commit details
    Browse the repository at this point in the history
  33. Add the stdatomic.h

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    88f58da View commit details
    Browse the repository at this point in the history
  34. Add sysconf.c (to let OCaml to know the _SC_PAGE{,_}SIZE)

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    9d56d63 View commit details
    Browse the repository at this point in the history
  35. Add the mmap() function

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    66f5aea View commit details
    Browse the repository at this point in the history
  36. Initialise the Thread Local Store

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    a11227c View commit details
    Browse the repository at this point in the history
  37. Upgrade ocaml-solo5 with OCaml 5.0

    Co-authored-by: Pierre Alain <[email protected]>
    Co-authored-by: Kate <[email protected]>
    Co-authored-by: Christiano Haesbaert <[email protected]>
    4 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    b50d638 View commit details
    Browse the repository at this point in the history
  38. Configuration menu
    Copy the full SHA
    06ce260 View commit details
    Browse the repository at this point in the history
  39. Use __c11 atomic macros when they are available (and fix the LLVM sup…

    …port)
    
    Co-authored-by: Pierre Alain <[email protected]>
    2 people authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    22ec349 View commit details
    Browse the repository at this point in the history
  40. Update to the new Solo5 API.

    palainp authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    f154390 View commit details
    Browse the repository at this point in the history
  41. minor change to trigger CI

    hannesm authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    8fa4ee3 View commit details
    Browse the repository at this point in the history
  42. use linux defines constants

    palainp authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    3c84241 View commit details
    Browse the repository at this point in the history
  43. bump solo5 version

    palainp authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    17113f5 View commit details
    Browse the repository at this point in the history
  44. explicit conversion from size_t to int

    palainp authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    cdb7aa1 View commit details
    Browse the repository at this point in the history
  45. add munmap

    palainp authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    c0cf23e View commit details
    Browse the repository at this point in the history
  46. bump ocaml version

    palainp authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    7eb825b View commit details
    Browse the repository at this point in the history
  47. fix mmap and munmap

    palainp authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    a8a84a0 View commit details
    Browse the repository at this point in the history
  48. add CHAR_BIT

    palainp authored and shym committed May 31, 2024
    Configuration menu
    Copy the full SHA
    c3394df View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    4a96b72 View commit details
    Browse the repository at this point in the history

Commits on Jul 19, 2024

  1. Stub sigwait

    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    47b0f7f View commit details
    Browse the repository at this point in the history
  2. Stub execv

    `execv` is used in `header.c` which will not be used in native
    cross-compiler anyway
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    348772b View commit details
    Browse the repository at this point in the history
  3. Define static_assert

    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    7d9de55 View commit details
    Browse the repository at this point in the history
  4. Define strnlen

    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    a29b575 View commit details
    Browse the repository at this point in the history
  5. Define some extra errno values

    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    48e8ee5 View commit details
    Browse the repository at this point in the history
  6. Use the compiler-provided stdatomic.h

    Use the builtin implementation of atomics of the compiler instead of a
    dummy one
    
    The compiler-provided `stdatomic.h` follows our constraints. Even if it
    is not explicitly listed in the freestanding headers:
    
    - clang still enables it with `-nostdlibinc` that the solo5 toolchain
      uses,
    - all gcc headers are brought into view anyway,
    - those headers respect `-ffreestanding` (ie they do not pull unwanted
      headers when `-ffreestanding` is enabled).
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    cf55596 View commit details
    Browse the repository at this point in the history
  7. Do not rebuild nolibc.a when nothing changed

    Remove the dependency from `nolibc.a` to a phony target that forces
    running `ar` on all builds
    The dependency to the test target is moved to `all`
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    3c03282 View commit details
    Browse the repository at this point in the history
  8. Trim down configure.sh and adapt Makefiles

    - SYSDEP_OBJS is constant so move it to the relevant Makefile
    - MAKECONF_CFLAGS is always empty so remove it
    - Drop the variables concerning the build machine
    - Rename the variables concerning the target using TARGET (rather than
      BUILD)
    - Remove aspects that are to be moved to a new solo5-ocaml toolchain:
      - adding explicitly the libgcc for the aarch64 target
      - picking the exact version and options of commands
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    48f9351 View commit details
    Browse the repository at this point in the history
  9. Clean up typos in configure.sh

    Use `${OPT#*=}` to remove only up to the first `=` (in case more than
    one appear in the argument)
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    2888a51 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6f590c2 View commit details
    Browse the repository at this point in the history
  11. WIP Create a OCaml/Solo5-specific cross toolchain

    Add a script to generate all the tools of a OCaml/Solo5 specific
    toolchain, using the `ARCH-solo5-ocaml-` tool prefix, in order to:
    
    - allow to have a clean way to point to the build directories in `-I`
      and `-L` options for nolibc and openlibm during the build, and to the
      installed directories after installation
    - build upon the toolchain autoconfiguration in OCaml's configure, so
      that it is not necessary to override each tool separately
    
    Add Makefile recipes to build the two variants of the toolchain, the one
    for build and the one to be installed
    
    Add a configure option to set up the tool prefix to use for the binutils
    that are not part of the Solo5 toolchain
    
    WIP: This creates wrappers for all the standard binutils, OCaml is using
    autoconf that detect most of them. This commit goes for consistency
    (covering them all) but maybe some are really not necessary.
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    5d6a5aa View commit details
    Browse the repository at this point in the history
  12. Define __BSD_VISIBLE and __XSI_VISIBLE when compiling C files

    Define openlibm's __BSD_VISIBLE and __XSI_VISIBLE to false when
    compiling C files
    openlibm headers use those macros to detect BSD and X/Open, but solo5
    is neither
    When left undefined, compiling openlibm generates warnings when
    compiling OCaml (those warnings are turned into errors when compiling
    development versions of the compiler)
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    6d32ebf View commit details
    Browse the repository at this point in the history
  13. Disable a Clang warning

    Disable Clang's unused-command-line-argument warning that triggers
    often as our toolchain is not smart enough to generate only useful
    arguments for each call
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    00de7bd View commit details
    Browse the repository at this point in the history
  14. Clean up options to build libraries

    Following the introduction of the OCaml/Solo5 toolchain, clean up all
    the options used to build the libraries
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    452ac54 View commit details
    Browse the repository at this point in the history
  15. Use OCaml's cross-compiler-aware configure and make

    Use OCaml's cross-compiler-aware versions of configure and make, which
    are able to detect the toolchain using only the configure `--target`
    argument
    Until this is available upstream, this is to be provided through local
    patches
    
    Reorganise Makefile targets so that `ocaml` is no longer both a
    directory and a phony target to build the compiler:
    - the `ocaml` target now creates the `ocaml` directory from either an
      `ocaml-src.tar.gz` archive or from the content of the `ocaml-src` OPAM
      package, and then applies patches found in `patches/<OCaml version>/`
    - an empty `_build/ocaml_is_built` file is used to record whether, and
      when, the compiler was built
    
    Accepting an archive for the OCaml sources makes it easy to use any
    (alpha, beta, ... or custom) version of the compiler, even if no
    `ocaml-src` package is available for it
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    e84b036 View commit details
    Browse the repository at this point in the history
  16. Remove workaround for mirage#101

    The specific toolchain allow the proper detection of the math library
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    c09bc95 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    45f55ab View commit details
    Browse the repository at this point in the history
  18. Update {,dist}clean targets

    Instead of removing the `ocaml` directory, invoke the `clean` and
    `distclean` rules of the compiler's Makefile, to play nicer with
    work done in there
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    9342962 View commit details
    Browse the repository at this point in the history
  19. Update the dependencies of the all target

    Update the dependencies of the `all` target to cover everything that
    needs to be installed
    Move it to the end, to use variables
    Create a `default` target to make sure `all` is still the default target
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    c016052 View commit details
    Browse the repository at this point in the history
  20. Add a test rule

    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    712b5dc View commit details
    Browse the repository at this point in the history
  21. Split up the declaration of phoniness of targets

    `ocaml` is no longer a phony target
    Follow the OCaml's usage of declaring `.PHONY`-ness of targets at the
    place those targets are defined, to make maintenance easier
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    e7fda01 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    6894d7f View commit details
    Browse the repository at this point in the history
  23. Generate an OPAM .install file

    Add two scripts to create an .install file:
    - `gen_ocaml_install.sh` drives (bends...) OCaml's `make install` in order
      to generate two subfiles, namely `_build/ocaml.install.lib{,exec}`,
      containing the lines to install the compiler itself, into the `lib`
      and `libexec` sections
    - `gen_dot_install.sh` generates the complete `.install` file, including
      the content of the subfiles for the compiler
    
    The generated `.install` file diverges from the current installation
    process in that it tries to follow the standard organisation of the OPAM
    directory: the OCaml cross-compiler is installed in `%{_:lib}%` (ie
    `%{prefix}%/lib/ocaml-solo5`) instead of `%{prefix}%/solo5-sysroot`.
    Note that the paths fed to `configure.sh` must be consistent with that
    for the installed compiler to work as expected.
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    09926fa View commit details
    Browse the repository at this point in the history
  24. WIP Use opam-installer for the install and uninstall targets

    In the standard use case, namely installation through OPAM, those
    targets are no longer necessary, since a `.install` file is generated so
    that OPAM does the installation itself
    Remove install.sh and uninstall.sh
    
    WIP: Should those targets be completely removed?
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    83f6429 View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    820fb6b View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    726c968 View commit details
    Browse the repository at this point in the history
  27. WIP OPAM package: Depend on the 5.2.0 OCaml compiler

    WIP Should the dependency be stricter? As ocaml.5.2.0 accepts
    ocaml-base-compiler.5.2.0~rc1, which would be rejected by the configure
    script (maybe the configure script is overly conservative)
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    542f109 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    75c4174 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    23a43dd View commit details
    Browse the repository at this point in the history
  30. Use an order-only dependency for nolibc test directory

    Co-authored-by: Fabrice Buoro <[email protected]>
    shym and fabbing committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    80168f6 View commit details
    Browse the repository at this point in the history
  31. Update comments in nolibc' signal.h

    Rephrase the comments to catch up with the evolutions of `signal.h`
    
    Co-authored-by: Fabrice Buoro <[email protected]>
    shym and fabbing committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    0df415e View commit details
    Browse the repository at this point in the history
  32. Ignore sigfillset

    Follow a suggestion by Christiano Haesbaert, as Solo5 doesn't provide
    signals, it might just be ignored
    As of OCaml 5.2.0 beta1, `sigfillset` is only used in functions creating
    threads, and so that will abort in any case. Ignoring the function may
    make it more future-proof, though.
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    b9575c2 View commit details
    Browse the repository at this point in the history
  33. Change pthread_create stub to report a failure to create

    Make extra sure that, if `pthread_create` is called, the caller will
    know it failed
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    34f02b9 View commit details
    Browse the repository at this point in the history
  34. Ensure that library dependencies work across Makefiles

    Since the main Makefile doesn't know the dependencies for the nolibc and
    openlibm libraries, create intermediate phony targets.
    That scheme ensures, even when one library already exists, that:
    - when building a target that depend on that library, a recursive make
      is invoked to check that it is up-to-date,
    - if the recursive make doesn't update the library, the dependency on
      the library is not a reason to rebuild the target.
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    6c9fd42 View commit details
    Browse the repository at this point in the history
  35. WIP Add patches for 5.2.0

    WIP: Should the test of version compatibility be relaxed, for instance
    to accept any version 5.2.0...?
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    89be472 View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    c3cebec View commit details
    Browse the repository at this point in the history
  37. Handle mmap(addr..., MAP_FIXED, ...) uses

    OCaml calls mmap with a non-null address and with the `MAP_FIXED` flag
    only on already reserved memory to commit or decommit that memory block,
    ie to set its protection to `PROT_READ|PROT_WRITE` or to `PROT_NONE`, in
    the `caml_mem_commit` and `caml_mem_decommit` functions
    So we accept this particular case without allocating memory that would
    leak since the OCaml code base simply ignores the returned value (as
    `MAP_FIXED` enforces the returned value to be either `addr` or
    `MAP_FAILED`)
    Accordingly, remove the man page extract that says that `addr` is just a
    hint since OCaml always sets `MAP_FIXED` when `addr` isn't null
    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    5ad3cc3 View commit details
    Browse the repository at this point in the history
  38. Reformulate two comments in mmap

    shym committed Jul 19, 2024
    Configuration menu
    Copy the full SHA
    0b3b7ff View commit details
    Browse the repository at this point in the history