Skip to content

Commit

Permalink
Get rid of the warning DT_TEXTREL on 32 bits (except for discover)
Browse files Browse the repository at this point in the history
Fixes #2
  • Loading branch information
dra27 authored and Chris00 committed Nov 11, 2021
1 parent bf0f221 commit 37f8e7f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
11 changes: 8 additions & 3 deletions config/discover.ml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,14 @@ let conf_crlibm c =
else (
copy "log.c" "log-selected.c";
);
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
3 changes: 2 additions & 1 deletion src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -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})))

0 comments on commit 37f8e7f

Please sign in to comment.