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
Producing a cmxs fails with -cc gcc #12284
Comments
TL;DR I don't think this is a bug, but there's certainly a patch which could be made to facilitate this...! I think that what we have here is a mismatch between what As part of #12278, I looked quite closely at this mechanism, but I think that changes to it are likely to be very slow to get in, because it's a very difficult part of the driver to test the impact of changes. Also, I don't think we can change the interpretation of For your use-case would it be sufficient to recreate the entire command being passed to Another benefit to simply adding output to |
It was the help text that gave me the wrong impression: I'm happy to implement the low-impact patch on I have to be clear on who I am to this, I'm just a user trying to override the C compiler OCaml uses to test features of other compilers. I'm not a dune contributor or a distro maintainer etc.. As for the It's just that the current (well, for the last, like, 15 years) use of |
I may very well have suggested this but do not remember where,
apologies.
Re: parsing of `Makefile.config`, one other approach would be to create
a small Makefile that includes it, say `Makefile.printconfig`:
```
include $(shell ocamlc -where)/Makefile.config
.PHONY: print-mkdll
print-mkdll:
@echo $(MKDLL)
```
then the command `make -f Makefile.printconfig` would print the
evaluated value of the `MKDLL` macro and of course the include line
could be elaborated to produce an error if `Makefile.config` odes not
exist.
|
Cross referencing ocaml/ocamlfind#69, which is dealing with the same issue. |
@shindere IMHO, there are two variables used by ocaml, MKEXE_EXP and MKDLL, but there's only one option for overriding (-cc). |
steps to reproduce
details
ocamlopt -verbose
showsgcc
called with-shared -o ...
as the final step to producelib.cmxs
.ocamlopt -verbose -cc gcc
, however, shows thatgcc
is called with just-o ...
.background info
ocamlopt -config | grep ^c_compiler
returnsgcc
.(flags :standard -cc my-cc)
indune-workspace
.cmxs
for each ofpossible patch
EDIT: this doesn't do the right thing in presence of flexdll. I'll write something more robust if this is indeed considered a bug and someone more familiar with the build system is willing to outline how
-cc
should behave.The text was updated successfully, but these errors were encountered: