chris00 / ocaml-crlibm Goto Github PK
View Code? Open in Web Editor NEWBinding to CRlibm
License: GNU Lesser General Public License v3.0
Binding to CRlibm
License: GNU Lesser General Public License v3.0
The flags for 32-bit linking need to make it to library_flags
. This gets rid of the DT_TEXTREL warnings (in all except discover.exe
):
diff --git a/config/discover.ml b/config/discover.ml
index 0a305bc..c41c9bf 100644
--- a/config/discover.ml
+++ b/config/discover.ml
@@ -71,12 +71,13 @@ let conf_crlibm c =
);
(* Workaround 32 bits linker problem. See
https://github.com/ocaml/opam-repository/pull/19943 *)
- let cflags = if arch = "i386" && system = "linux_elf" then
- "-Wl,-z -Wl,notext" :: cflags
- else cflags in
- cflags
+ let libflags = if arch = "i386" && system = "linux_elf" then
+ ["-ccopt"; "-z"; "-ccopt"; "notext"]
+ else [] in
+ cflags, libflags
let () =
let c = C.create "crlibm" in
- let cflags = conf_crlibm c in
- C.Flags.write_sexp "c_flags.sexp" cflags
+ let cflags, libflags = conf_crlibm c in
+ C.Flags.write_sexp "c_flags.sexp" cflags;
+ C.Flags.write_sexp "lib_flags.sexp" libflags
diff --git a/src/dune b/src/dune
index 19addb1..e3001d5 100644
--- a/src/dune
+++ b/src/dune
@@ -22,12 +22,13 @@
double2scs zero_scs
multiplication_scs scs2double)
(c_flags :standard (:include c_flags.sexp))
+ (library_flags :standard (:include lib_flags.sexp))
(synopsis "Binding to CRlibm, correctly rounded math lib"))
(copy_files# crlibm/*.{c,h})
(copy_files# crlibm/scs_lib/*.{c,h})
(rule
- (targets log-selected.c c_flags.sexp)
+ (targets log-selected.c c_flags.sexp lib_flags.sexp)
(deps ../config/discover.exe)
(action (run %{deps})))
However, config/discover.ml
selects between log.c
and log-td.c
- log-td.c
doesn't contain the same functions which appears to be the underlying cause of the all the missing symbols in ocaml/opam-repository#19943
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.