Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
Next version
- GPR#52: -base option consistently applied to mingw64, cygwin64 and msvc64.
Default is no longer specified, making msvc64 consistent with the other two
ports (David Allsopp)
- GPR#52: 64-bit ports can now always process RELOC_REL32* jumps by generating
trampolines for cases where the relocations are more than 32GiB away. New
functionality passed as flexdll_relocate_v2, which allows mixing executables
and DLLs compiled with and without the new features. If either executable or
DLL lacks the flexdll_relocate_v2 support, then it falls back to the previous
error message if a RELOC_REL32 is more than 2GiB away. (David Allsopp)
- GPR#127: Recognise hyphens in option names in the COFF .drectve section. Fixes #126 (Reza Barazesh)
- GPR#136: Fix parallel access crashes and misbehavior (David Allsopp, Jan Midtgaard, Antonin Décimo)
- GPR#140: Fixes #29. Support relocation kind 0003 (IMAGE_REL_AMD64_ADDR32NB) and
Expand Down
46 changes: 33 additions & 13 deletions appveyor_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,32 @@ function configure_ocaml {
sed -i -e 's/@iflexdir@/-I"$(ROOTDIR)\/flexdll"/' Makefile.config.in
fi

if [ "$1" = "full" ] ; then
DISABLE=()
else
DISABLE=(--disable-debugger \
--disable-ocamldoc \
--disable-systhreads \
--disable-str-lib \
--disable-unix-lib \
--disable-bigarray-lib \
$GRAPHICS_DISABLE \
$OCAMLTEST_DISABLE \
--disable-debug-runtime)
fi
./configure --build=x86_64-pc-cygwin --host=$OCAML_TARGET \
--prefix=$OCAMLROOT \
--disable-debugger \
--disable-ocamldoc \
--disable-systhreads \
--disable-str-lib \
--disable-unix-lib \
--disable-bigarray-lib \
$GRAPHICS_DISABLE \
$OCAMLTEST_DISABLE \
--disable-debug-runtime
--prefix=$OCAMLROOT "${DISABLE[@]}"
else
# "Classic" configuration
cp config/m-nt.h $HEADER_DIR/m.h
cp config/s-nt.h $HEADER_DIR/s.h

sed -e "s|PREFIX=.*|PREFIX=$OCAMLROOT|" \
-e 's/\(OTHERLIBRARIES\|WITH_DEBUGGER\|WITH_OCAMLDOC\|DEBUGGER\|EXTRALIBS\|WITH_OCAMLBUILD\|CAMLP4\)=.*/\1=/' \
if [ "$1" = "full" ] ; then
DISABLE=()
else
DISABLE=(-e 's/\(OTHERLIBRARIES\|WITH_OCAMLDOC\|WITH_DEBUGGER\|DEBUGGER\|EXTRALIBS\|WITH_OCAMLBUILD\|CAMLP4\)=.*/\1=/')
fi
sed -e "s|PREFIX=.*|PREFIX=$OCAMLROOT|" "${DISABLE[@]}" \
config/Makefile.$OCAML_PORT > $CONFIG_DIR/Makefile
#run "Content of config/Makefile" cat $CONFIG_DIR/Makefile
fi
Expand Down Expand Up @@ -196,14 +204,26 @@ done
popd

if [ "$SKIP_OCAML_TEST" = no ] ; then
configure_ocaml
configure_ocaml full

if [[ -e otherlibs/win32unix/Makefile ]]; then
unix_dir='win32'
else
unix_dir=''
fi
# This tortures the ocamldoc compilation as it means that dllcamlstr,
# dllunix and ocamlrun will all be more than 2GiB apart.
sed -i -e "s/^LDOPTS=.*/\0 -ldopt -base -ldopt 0x210000000/" "otherlibs/${unix_dir}unix/Makefile"
sed -i -e "/^include \.\.\/Makefile/aLDOPTS=-ldopt -base -ldopt 0x310000000" otherlibs/str/Makefile

cd flexdll
git remote add local $(echo "$APPVEYOR_BUILD_FOLDER"| cygpath -f -) -f --tags
run "git checkout $APPVEYOR_REPO_COMMIT" git checkout merge
cd ..

mv $OCAMLROOT $OCAMLROOT-Disabled
run "make world" $MAKEOCAML flexdll world
mv $OCAMLROOT-Disabled $OCAMLROOT
fi

if [ "$ARTEFACTS" = 'yes' ] ; then
Expand Down
4 changes: 2 additions & 2 deletions cmdline.ml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ let implib = ref false
let deffile = ref None
let stack_reserve = ref None
let no_rel_relocs = ref false
let base_addr = ref "0x10000"
let base_addr = ref None

let usage_msg =
Printf.sprintf
Expand Down Expand Up @@ -86,7 +86,7 @@ let specs = [
"-norelrelocs", Arg.Set no_rel_relocs,
" Ensure that no relative relocation is generated";

"-base", Arg.String (fun s -> base_addr := s),
"-base", Arg.String (fun s -> base_addr := Some s),
" Specify base address (Win64 only)";

"-pthread", Arg.Unit (fun () -> extra_args := "-pthread" :: !extra_args),
Expand Down
Loading