Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005234OCamlOCaml generalpublic2011-03-03 20:262011-05-17 16:14
Reporterdb 
Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.12.0 
Target VersionFixed in Version3.12.1+dev 
Summary0005234: ocamlopt -shared does not preserve order of -cclib options
DescriptionConsider the following example (Windows, MSVC port):

foo.ml:
let x = 1

bar.ml:
let _ = Printf.printf "%d\n" Foo.x

ocamlopt -a -o foo.cmxa -cclib -defaultlib -cclib msvcrt.lib foo.ml
ocamlopt -verbose -o bar.exe foo.cmxa bar.ml
  gives
  + flexlink -merge-manifest -exe -link /STACK:16777216 -o "bar.exe"
  "-LC:\Ocaml\lib" "C:\DOCUME~1\dbely\LOCALS~1\Temp\camlstartup799bea.obj"
  "C:\Ocaml\lib\std_exit.obj" "bar.obj" "foo.lib" "C:\Ocaml\lib\stdlib.lib"
  "-defaultlib" "msvcrt.lib" "C:\Ocaml\lib\libasmrun.lib" advapi32.lib
  ws2_32.lib
  (correct)

ocamlopt -verbose -shared -o bar.cmxs foo.cmxa bar.ml
  gives
  + flexlink -merge-manifest -o "bar.cmxs" "-LC:\Ocaml\lib"
  "bar.cmxs.startup.obj" "bar.obj" "foo.lib" "msvcrt.lib" "-defaultlib"
  flexlink: option `-defaultlib' needs an argument.

Note that "-defaultlib" "msvcrt.lib" order is reversed.
TagsNo tags attached.
Attached Files

- Relationships
related to 0005260closed ocaml compiler presents static link libraries to GCC backwards 

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-03-03 20:26 db New Issue
2011-05-02 12:47 doligez Relationship added related to 0005260
2011-05-16 16:36 doligez Status new => acknowledged
2011-05-17 16:14 doligez Status acknowledged => closed
2011-05-17 16:14 doligez Resolution open => fixed
2011-05-17 16:14 doligez Fixed in Version => 3.12.1+dev


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker