Skip to content

How to make OCaml build honour CFLAGS, LDFLAGS et al #9191

@rseichter

Description

@rseichter

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions