Guest User

Untitled

a guest
Feb 16th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.74 KB | None | 0 0
  1. Index: reloc.ml
  2. ===================================================================
  3. --- reloc.ml (révision 195)
  4. +++ reloc.ml (copie de travail)
  5. @@ -160,10 +160,10 @@
  6.  
  7. let gcclib () =
  8. let extra = match !toolchain with
  9. - | `MINGW -> "-mno-cygwin "
  10. + | `MINGW -> "i686-w64-mingw32-"
  11. | _ -> ""
  12. in
  13. - Filename.dirname (get_output1 ~use_bash:(!toolchain = `CYGWIN) (Printf.sprintf "gcc %s-print-libgcc-file-name" extra))
  14. + Filename.dirname (get_output1 ~use_bash:(!toolchain = `CYGWIN) (Printf.sprintf "%sgcc -print-libgcc-file-name" extra))
  15.  
  16. let file_exists fn =
  17. if Sys.file_exists fn && not (Sys.is_directory fn) then Some fn
  18. @@ -494,7 +494,8 @@
  19. failwith "Creation of import library not supported for this toolchain"
  20. | `CYGWIN | `MINGW ->
  21. let dmp = temp_file "dyndll" ".dmp" in
  22. - if cmd_verbose (Printf.sprintf "objdump -p %s > %s" fn dmp) <> 0
  23. + let pre = if !toolchain = `MINGW then "i686-w64-mingw32-" else "" in
  24. + if cmd_verbose (Printf.sprintf "%sobjdump -p %s > %s" pre fn dmp) <> 0
  25. then failwith "Error while extracting exports from a DLL";
  26. parse_dll_exports dmp
  27.  
  28. @@ -908,10 +909,10 @@
  29. Filename.quote def_file
  30. in
  31. Printf.sprintf
  32. - "gcc -mno-cygwin -m%s %s%s -L. %s %s -o %s %s %s %s %s %s"
  33. + "i686-w64-mingw32-gcc -m%s %s%s -L. %s %s -o %s %s %s %s %s %s"
  34. !subsystem
  35. (if link_exe = `EXE then "" else "-shared ")
  36. - (if main_pgm then "" else if !noentry then "-Wl,-e0 " else "-Wl,-e_FlexDLLiniter@12 ")
  37. + (if main_pgm then "" else if !noentry then "-Wl,-e0 " else if !machine = `x86 then "-Wl,-e_FlexDLLiniter@12 " else "-Wl,-eFlexDLLiniter ")
  38. (mk_dirs_opt "-I")
  39. (mk_dirs_opt "-L")
  40. (Filename.quote output_file)
  41. @@ -989,6 +990,7 @@
  42. [ "/lib/mingw";
  43. "/lib";
  44. "/lib/w32api";
  45. + "/usr/i686-w64-mingw32/sys-root/mingw/lib";
  46. gcclib () ];
  47. default_libs :=
  48. ["-lmingw32"; "-lgcc"; "-lmoldname"; "-lmingwex"; "-lmsvcrt";
  49. @@ -1017,10 +1019,10 @@
  50. file
  51. | `MINGW ->
  52. Printf.sprintf
  53. - "gcc -mno-cygwin -c -o %s %s %s"
  54. + "i686-w64-mingw32-gcc -c -o %s %s %s"
  55. (Filename.quote tmp_obj)
  56. (mk_dirs_opt "-I")
  57. - file
  58. + (Filename.quote file)
  59. | `LIGHTLD ->
  60. failwith "Compilation of C code is not supported for this toolchain"
  61. in
  62. Index: Makefile
  63. ===================================================================
  64. --- Makefile (révision 195)
  65. +++ Makefile (copie de travail)
  66. @@ -1,4 +1,4 @@
  67. -VERSION = 0.26
  68. +VERSION = 0.26+mingw64
  69. all: flexlink.exe support
  70.  
  71. include $(shell cygpath -ad "$(shell ocamlopt -where)/Makefile.config")
  72. @@ -9,7 +9,8 @@
  73.  
  74. # Supported tool-chains
  75.  
  76. -CHAINS = mingw cygwin msvc msvc64
  77. +#CHAINS = mingw mingw64 cygwin msvc msvc64
  78. +CHAINS = mingw cygwin
  79.  
  80.  
  81. # Compilers
Add Comment
Please, Sign In to add comment