Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ocamlbuild: many improvements (macos 10.5 fix, correct dllpath, etc)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12033 85f007b7-540e-0410-9357-904b9bb8a0f7
- Loading branch information
letouzey
committed
Mar 29, 2009
1 parent
0269921
commit 301d6bf
Showing
6 changed files
with
249 additions
and
232 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
bin.otarget | ||
binaries | ||
vo.otarget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#/bin/sh | ||
|
||
### Temporary fix for production of .cmxs on MacOS 10.5 | ||
|
||
OCAMLOPT=$1 | ||
CMXS=$2 | ||
CMXA=$3 | ||
|
||
$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 plugins are on directory base and include all files) | ||
ld -bundle -flat_namespace -undefined warning -read_only_relocs suppress -o $CMXS `dirname $CMXS`/*.o | ||
rm $CMXS.startup.o $CMXS.startup.s $CMXS.startup.fixed.s |
Oops, something went wrong.