|Anonymous | Login | Signup for a new account||2017-02-19 22:24 CET|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001800||OCaml||OCaml general||public||2003-08-27 20:01||2016-12-08 13:54|
|Target Version||Fixed in Version|
|Summary||0001800: -output-obj and c files|
|Description||Full_Name: Trevor Jim|
OS: Mac OS X
Submission from: targe.cs.princeton.edu (184.108.40.206)
Hm, thought I submitted this but I don't see it in the database...
Anyway there is an inconsistency in the way that -output-obj handles C files.
For example, if I do
ocamlopt -custom -o bar <lots of cmx files> foo.c
then ocamlopt compiles foo.c to foo.o and links it in to bar.
But if I do
ocamlopt -output-obj -o bar.o <lots of cmx files> foo.c
then ocamlopt compiles foo.c to foo.o, and DOES NOT link it in to bar.o.
Bug or feature? You decide.
|Tags||No tags attached.|
"-output-obj" is a bit of a strange one since it does effectively a partial link: the OCaml objects are bundled together but any required C stubs are not (and neither is the runtime library). A final link using the system linker is required to put everything together.
Given this and the documentation in the manual the exhibited behaviour in this PR seems correct. It also seems to be consistent with other command line flags (for example "-shared" looks to ignore C objects as well, but will presumably compile them).
I'm torn between just closing this or altering the compiler so that functionality of this form (where C files may be compiled but not linked, for whatever definition of "linked" is appropriate) is changed to reject C input files. Opinions?
|2005-11-18 10:13||administrator||New Issue|
|2016-12-08 13:54||shinwell||Note Added: 0016873|
|2016-12-08 13:54||shinwell||Assigned To||=> shinwell|
|2016-12-08 13:54||shinwell||Status||acknowledged => assigned|
|Copyright © 2000 - 2011 MantisBT Group|