Gentoo Linux verifies that all built binaries honour environment variables like CFLAGS and LDFLAGS as they are set by our Portage build system. To achieve this, we usually modify the upstream build. For OCaml, I currently use
sed -i -e 's/\(^OC_LDFLAGS=.*\)/\1 $(LDFLAGS)/' Makefile.config.in
before the configure stage. This takes care of the bin/ocaml* files, but I am still trying to figure out the best way to ensure that libraries and plugins (*.so and *.cmxs) also pass Gentoo's QA checks. I tried extending NATDYNLINKOPTS in a similar manner as I did OC_LDFLAGS, but that does not seem to make a difference.
Looking at Native-code compilation, I can't quite figure out the best way to do it, and I would appreciate your suggestions.
Gentoo Linux verifies that all built binaries honour environment variables like CFLAGS and LDFLAGS as they are set by our Portage build system. To achieve this, we usually modify the upstream build. For OCaml, I currently use
sed -i -e 's/\(^OC_LDFLAGS=.*\)/\1 $(LDFLAGS)/' Makefile.config.inbefore the configure stage. This takes care of the
bin/ocaml*files, but I am still trying to figure out the best way to ensure that libraries and plugins (*.soand*.cmxs) also pass Gentoo's QA checks. I tried extending NATDYNLINKOPTS in a similar manner as I did OC_LDFLAGS, but that does not seem to make a difference.Looking at Native-code compilation, I can't quite figure out the best way to do it, and I would appreciate your suggestions.