gen_flags.sh 427 B

123456789101112131415161718
  1. #!/bin/sh
  2. # https://discuss.ocaml.org/t/dune-how-to-link-statically-on-linux-not-on-others/8537/4?u=mro
  3. # https://discuss.ocaml.org/t/ld-error-missing-note-gnu-stack-section/12478/3
  4. case "$(uname -s)" in
  5. Darwin)
  6. # do not link statically on macos.
  7. echo '(:standard -cclib)'
  8. ;;
  9. FreeBSD)
  10. echo '(:standard -cclib "-z noexecstack" -ccopt -static)'
  11. ;;
  12. *)
  13. echo '(:standard -ccopt -static)'
  14. ;;
  15. esac