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

Duniverse v1.13 #4

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

actionshrimp
Copy link

@actionshrimp actionshrimp commented Oct 9, 2023

  • Rebase onto Zarith v1.13
  • Remove reference to config.guess which was removed from Zarith upstream.
  • I believe the target branch needs to be duniverse-v1.13 as well, but I don't think I can set that.

recoules and others added 30 commits November 9, 2020 23:57
`ocamlmklib` supports some but not all linker flags. we have some `LDFLAGS` that are not supported by `ocamlmklib`, so they need to be passed via `-ldopt`. this PR prepends `-ldopt` to each word in `LIBS` (which is set to `LDFLAGS` in ./configure).
Add functions to generate integers pseudo-randomly
Add fast path when extraction leads to intnat
pass LDFLAGS to ocamlmklib via -ldopt
It looks like `-native` causes `ocamldep` to produce insufficient dependencies for a bytecode + native build like we need to do.  See log at https://881129.bugs.gentoo.org/attachment.cgi?id=832035
)

This allows linux-riscv targets to be detected successfully.
The build uses ocamlc to compile C files, so it's more reliable to test C compilation and linking using $ocamlc than using $cc.

Also: add .gitattributes for Windows

Co-authored-by: Xavier Leroy <[email protected]>
With the flambda variants of the ocaml compiler, compilation failed with
`Error (warning 58 [no-cmx-file]): no cmx file was found in path for module Zarith_version, and its interface was not compiled with -opaque`
When testing for the availability of a library, don't pass compilation flags to the linker: they are not relevant and flexdll may not recognize them.

Co-authored-by: Hugo Heuzard <[email protected]>
We no longer need it to select between assembly files.
This works better on Mac with Homebrew, for example.
Fall back to the old method if pkg-config is not available or doesn't work.
Namely:
- Whether GMP was found from pkg-config
- Which C includes were selected (in summary of configuration)
Some simplifications and improvements to the configure script
Co-authored-by: Hugo Heuzard <[email protected]>
Co-authored-by: Xavier Leroy <[email protected]>
This patch improves the bounds used in of_float to decide whether the double can fit into an OCaml 63-bit tagged int.

The upper bound is 0x3ffffffffffffe00, which is exactly representable as a double (2^53-1)*2^9 = (2-2^-52) * 2^61 as it is 1.1...1 * 2^61 with 52 ones after the 1, and is less than 2^62, so it is representable as an OCaml int.   The double just after 0x3ffffffffffffe00 is 0x4000000000000000, or 2^62, which does not fit an OCaml int.

For the lower bound, -0x4000000000000000 is exactly representable as a double, but also the smallest number that fits an OCaml int.
`-L/path/to/gmp/lib` must be passed as is to `ocamlmklib`, not behind a `-ldopt` flag, otherwise it is ignored in static linking situations.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.