I would like to ask for your collective wisdom again. Upstream has provided OC_CFLAGS and OC_LDFLAGS as a way to set the default compiler and linker flags for ocamlopt. However, there is currently no way to set the default linker flags for ocamlmklib. Many OCaml stublibs in Fedora are therefore not linked with the Fedora hardening flags. I've done some hacky things in some packages to relink the stublibs with the correct flags, but it would be nice if ocamlmklib would use the right flags out of the box.
I took a stab tonight at embedding OC_LDFLAGS in ocamlmklib. It doesn't seem very difficult. Would one or two of you mind looking at the attached patch and see what you think? If it looks good, I will try submitting it upstream. Thank you,