| Anonymous | Login | Signup for a new account | 2013-05-18 23:06 CEST | ![]() |
| Main | My View | View Issues | Change Log | Roadmap |
| View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
| ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
| 0005921 | OCaml | OCaml general | public | 2013-02-13 18:03 | 2013-03-22 18:59 | |||||||
| Reporter | avsm | |||||||||||
| Assigned To | ||||||||||||
| Priority | normal | Severity | minor | Reproducibility | always | |||||||
| Status | resolved | Resolution | fixed | |||||||||
| Platform | OS | MacOS X | OS Version | 10.8 | ||||||||
| Product Version | 4.00.1 | |||||||||||
| Target Version | Fixed in Version | |||||||||||
| Summary | 0005921: 4.01.0dev emits compact unwind warnings since switch to clang | |||||||||||
| Description | On latest MacOS X and trunk, any invocation of the linker results in warnings such as: ld: warning: could not create compact unwind for _camlTypecore__add_pattern_variables_1925: stack subq instruction is too different from dwarf stack size ld: warning: could not create compact unwind for _camlTypecore__type_pattern_1937: stack subq instruction is too different from dwarf stack size ld: warning: could not create compact unwind for _camlTypecore__type_pattern_list_1949: stack subq instruction is too different from dwarf stack size ld: warning: could not create compact unwind for _camlTypecore__type_class_arg_pattern_1959: stack subq instruction is too different from dwarf stack size ld: warning: could not create compact unwind for _camlTypecore__mkpat_1981: stack subq instruction is too different from dwarf stack size The warnings can be suppressed by passing -no-compact-unwind to the linker: --- a/configure +++ b/configure @@ -734,7 +734,8 @@ case "$arch,$nativecc,$system,$host_type" in *,*,rhapsody,*) nativecccompopts="$gcc_warnings -DDARWIN_VERSION_6 $dl_defs" if $arch64; then partialld="ld -r -arch ppc64"; fi;; *,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";; - amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";; + amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64" + nativecccompopts="-Wl,-no_compact_unwind";; amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";; *,gcc*,*,*) nativecccompopts="$gcc_warnings";; esac but I've not got an older 10.6/7 to see if this breaks anything there. Although I notice that trunk is also broken on 10.6 due to http://caml.inria.fr/mantis/view.php?id=5912 [^] The above patch also still results in relocation warnings while bootstrapping the compiler. | |||||||||||
| Steps To Reproduce | $ echo 'let _ = Printf.printf "foo%!"' > test.ml $ ocamlopt -linkall test.ml <warnings result on MacOS X 10.8> | |||||||||||
| Tags | No tags attached. | |||||||||||
| Attached Files | ||||||||||||
Notes |
|
|
(0008929) doligez (manager) 2013-02-26 13:43 |
Reproduced on 10.7.5 with Xcode 4.5.1. Your patch doesn't work (at least on my machine) because this part of the configuration script is totally messed up: the nativecccompopts variable is not used to link native executables. We will need to clean up the configuration script and the "driver" part of the compilers. |
|
(0009002) doligez (manager) 2013-03-22 18:59 |
In fact, $nativecccompopts is not used for linking executables. Nor is $nativecclinkopts (this is used only with ld for packing libraries). The flag must be put into both $mksharedlib and $mkexe. I've done that and the warning disappeared (commit 13423 in trunk). Not tested on earlier versions of XCode. If they break and someone cares, we'll probably have to test for the presence of "clang" in the path before we add this flag. |
Issue History |
|||
| Date Modified | Username | Field | Change |
| 2013-02-13 18:03 | avsm | New Issue | |
| 2013-02-26 13:43 | doligez | Note Added: 0008929 | |
| 2013-02-26 13:43 | doligez | Status | new => confirmed |
| 2013-03-22 18:59 | doligez | Note Added: 0009002 | |
| 2013-03-22 18:59 | doligez | Status | confirmed => resolved |
| 2013-03-22 18:59 | doligez | Resolution | open => fixed |
| Copyright © 2000 - 2011 MantisBT Group |