Skip to content
This repository was archived by the owner on Oct 18, 2020. It is now read-only.

Commit bbf369d

Browse files
authored
Merge pull request #211 from avsm/408-more
add support for 4.08.0 release
2 parents e645ac4 + f6fd38f commit bbf369d

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ env:
66
- OCAML_VERSION=4.05
77
- OCAML_VERSION=4.06
88
- OCAML_VERSION=4.07
9+
- OCAML_VERSION=4.08

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## v3.3.1 (2019-06-25)
22

33
* Fix CFLAGS generation with repeated spaces on Linux (#210 @TheLortex)
4+
* Add support for 4.08 final release (continued from #206 by @avsm)
45

56
## v3.3.0 (2019-02-16)
67

xen-ocaml/build.sh

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -105,44 +105,50 @@ case $OCAMLOPT_VERSION in
105105
echo Applying OCaml 4.08.0 config
106106
cp config/version-4080.h ocaml-src/runtime/caml/version.h
107107
S_H_LOCATION="ocaml-src/runtime/caml/"
108-
BIGARRAY_OBJ="mmap.o mmap_ba.o"
108+
BIGARRAY_OBJ=""
109109
CFLAGS="-D__ANDROID__ $CFLAGS"
110+
CONFIGURE_OPTS="--disable-vmthreads --disable-systhreads --disable-graph-lib --disable-str-lib --disable-unix-lib --disable-ocamldoc"
110111
;;
111112
*)
112113
echo unsupported OCaml version $OCAMLOPT_VERSION
113114
exit 1
114115
;;
115116
esac
116117

117-
cd ocaml-src && ./configure && cd ..
118+
cd ocaml-src && ./configure ${CONFIGURE_OPTS} && cd ..
118119
cp config/s.h $S_H_LOCATION
119120

120121
cd ocaml-src
121122

122-
# cd byterun && make BYTECCCOMPOPTS="${CFLAGS}" BYTECCCOMPOPTS="${CFLAGS}" libcamlrun.a && cd ..
123-
124123
case $OCAMLOPT_VERSION in
125124
4.04.2|4.05.*)
126125
cd asmrun && make -j${NJOBS} UNIX_OR_WIN32=unix NATIVECCCOMPOPTS="-DNATIVE_CODE ${CFLAGS}" NATIVECCPROFOPTS="-DNATIVE_CODE ${CFLAGS}" libasmrun.a && cd ..
126+
IS_408_OR_MORE=0
127127
;;
128128
4.06.*|4.07.*)
129129
cd asmrun && make -j${NJOBS} UNIX_OR_WIN32=unix CPPFLAGS="-DNATIVE_CODE ${CFLAGS} -I../byterun -DTARGET_${TARGET_ARCH}" NATIVECCPROFOPTS="-DNATIVE_CODE ${CFLAGS}" libasmrun.a && cd ..
130+
IS_408_OR_MORE=0
130131
;;
131132
4.08.*)
132-
cd runtime && make -j${NJOBS} UNIX_OR_WIN32=unix CPPFLAGS="-DNATIVE_CODE ${CFLAGS} -DTARGET_${TARGET_ARCH}" NATIVECCPROFOPTS="-DNATIVE_CODE ${CFLAGS}" libasmrun.a && cd ..
133+
cd runtime && make -j${NJOBS} UNIX_OR_WIN32=unix OC_NATIVE_CPPFLAGS="-DNATIVE_CODE -DXXXX=1 ${CFLAGS} -DTARGET_${TARGET_ARCH}" libasmrun.a && cd ..
134+
IS_408_OR_MORE=1
133135
;;
134136
*)
135137
echo unsupported OCaml version $OCAMLOPT_VERSION
136138
exit 1
137139
;;
138140
esac
139-
# This directory doesn't really exist on 4.08, but it's also unneeded, so it's
140-
# effectively harmless to leave it here.
141-
CFLAGS="$CFLAGS -I../../byterun"
142-
cd otherlibs/bigarray && make CFLAGS="${CFLAGS} -I../unix -DIN_OCAML_BIGARRAY" ${BIGARRAY_OBJ}
143-
ar rcs ../../libxenotherlibs.a ${BIGARRAY_OBJ}
144141

145-
cd ../../..
142+
if [ $IS_408_OR_MORE -eq 0 ]; then
143+
CFLAGS="$CFLAGS -I../../byterun"
144+
cd otherlibs/bigarray && make CFLAGS="${CFLAGS} -I../unix -DIN_OCAML_BIGARRAY" ${BIGARRAY_OBJ}
145+
ar rcs ../../libxenotherlibs.a ${BIGARRAY_OBJ}
146+
cd ../..
147+
else
148+
ar rcs libxenotherlibs.a
149+
fi
150+
151+
cd ..
146152

147153
echo "($(cat flags/libs.tmp) -cclib \"$(pkg-config libminios-xen openlibm --libs | xargs)\")" > flags/libs
148154
echo "($(pkg-config libminios-xen openlibm --cflags | xargs) $(cat flags/cflags.tmp))" > flags/cflags

0 commit comments

Comments
 (0)