diff options
-rw-r--r-- | Makefile.build | 4 | ||||
-rw-r--r-- | configure.ml | 16 | ||||
-rwxr-xr-x | dev/ocamlopt_shared_os5fix.sh | 29 |
3 files changed, 1 insertions, 48 deletions
diff --git a/Makefile.build b/Makefile.build index 382370df9..e53ebf2e6 100644 --- a/Makefile.build +++ b/Makefile.build @@ -572,11 +572,7 @@ plugins/%.cmx: plugins/%.ml %.cmxs: %.cmxa $(SHOW)'OCAMLOPT -shared -o $@' -ifeq ($(HASNATDYNLINK),os5fixme) - $(HIDE)dev/ocamlopt_shared_os5fix.sh "$(OCAMLOPT)" $@ -else $(HIDE)$(OCAMLOPT) -linkall -shared -o $@ $< -endif %.ml: %.mll $(SHOW)'OCAMLLEX $<' diff --git a/configure.ml b/configure.ml index a1c243d65..06d8e713b 100644 --- a/configure.ml +++ b/configure.ml @@ -632,22 +632,8 @@ let best_compiler = let hasnatdynlink = !Prefs.natdynlink && best_compiler = "opt" -(** OCaml 3.11.0 dynlink is buggy on MacOS 10.5, and possibly - also on 10.6.(0|1|2) for x86_64 and 10.6.x on x86_32 *) - -let needs_MacOS_fix () = - match hasnatdynlink, arch, caml_version_nums with - | true, "Darwin", 3::11::_ -> - (match string_split '.' (fst(run "uname" ["-r"])) with - | "9"::_ -> true - | "10"::("0"|"1"|"2")::_ -> true - | "10"::_ when Sys.word_size = 32 -> true - | _ -> false) - | _ -> false - let natdynlinkflag = - if needs_MacOS_fix () then "os5fixme" else - if hasnatdynlink then "true" else "false" + if hasnatdynlink then "true" else "false" (** * OS dependent libraries *) diff --git a/dev/ocamlopt_shared_os5fix.sh b/dev/ocamlopt_shared_os5fix.sh deleted file mode 100755 index f7d31ad81..000000000 --- a/dev/ocamlopt_shared_os5fix.sh +++ /dev/null @@ -1,29 +0,0 @@ -#/bin/sh - -### Temporary fix for production of .cmxs on MacOS 10.5 - -OCAMLOPT=$1 -CMXS=$2 - -DIR=`dirname $CMXS` -BASE=`basename $CMXS .cmxs` -CMXA=$DIR/$BASE.cmxa -ARC=$DIR/$BASE.a -# we assume that all object files are at the same place than the rest -OBJS=`ar t $ARC | sed -e "s|^|$DIR/|" | grep -v SYMDEF` - -$OCAMLOPT -dstartup -linkall -shared -o $CMXS $CMXA -# Fix1: add a dummy instruction before the caml generic functions -# Fix2: make all caml generic functions private -rm -f $CMXS $CMXS.startup.fixed.s -cat $CMXS.startup.s | sed \ - -e "s/_caml_shared_startup__code_begin:/_caml_shared_startup__code_begin: ret/" \ - -e "s/.globl _caml_curry/.private_extern _caml_curry/" \ - -e "s/.globl _caml_apply/.private_extern _caml_apply/" \ - -e "s/.globl _caml_tuplify/.private_extern _caml_tuplify/" \ - > $CMXS.startup.fixed.s -# Recompile fixed startup code -as -o $CMXS.startup.o $CMXS.startup.fixed.s -# Build fixed .cmxs (assume all object files are at the same place) -ld -bundle -flat_namespace -undefined warning -read_only_relocs suppress -o $CMXS $OBJS $CMXS.startup.o -rm $CMXS.startup.o $CMXS.startup.s $CMXS.startup.fixed.s
\ No newline at end of file |