Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add OCAMLOPT_SHARED for genenrating .cmxs files #69

Merged
merged 1 commit into from Mar 10, 2024

Conversation

ChenQi1989
Copy link
Contributor

When '-cc' is specified to ocamlopt, the '-shared' option will not have effect[1].

Add OCAMLOPT_SHARED so that users can specify OCAMLOPT and OCAMLOPT_SHARED separately.
e.g.,
OCAMLOPT = "ocamlopt -verbose -cc '${CC}' -ccopt '--sysroot=${STAGING_DIR_TARGET} ${CFLAGS}' -cclib '${LDFLAGS}' -I +compiler-libs" OCAMLOPT_SHARED = "ocamlopt -verbose -cc '${CC} -shared' -ccopt '--sysroot=${STAGING_DIR_TARGET} ${CFLAGS}' -cclib '${LDFLAGS}' -I +compiler-libs"

This will avoid build failure when specifying '-cc'.

[1] https://discuss.ocaml.org/t/ocamlopt-has-problem-with-cc-and-i-dir-options-when-theyre-not-in-standard-location/13346/5

When '-cc' is specified to ocamlopt, the '-shared' option will
not have effect[1].

Add OCAMLOPT_SHARED so that users can specify OCAMLOPT and OCAMLOPT_SHARED
separately.
e.g.,
OCAMLOPT = "ocamlopt -verbose -cc '${CC}' -ccopt '--sysroot=${STAGING_DIR_TARGET} ${CFLAGS}' -cclib '${LDFLAGS}' -I +compiler-libs"
OCAMLOPT_SHARED = "ocamlopt -verbose -cc '${CC} -shared' -ccopt '--sysroot=${STAGING_DIR_TARGET} ${CFLAGS}' -cclib '${LDFLAGS}' -I +compiler-libs"

This will avoid build failure when specifying '-cc'.

[1] https://discuss.ocaml.org/t/ocamlopt-has-problem-with-cc-and-i-dir-options-when-theyre-not-in-standard-location/13346/5

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants