mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-03-11 07:20:29 -07:00
update compilation instructions for iOS and emscripten
We don't need a separate host compiler anymore.
This commit is contained in:
parent
f0ef267ce7
commit
b77a0bbf06
2 changed files with 10 additions and 32 deletions
35
INSTALL
35
INSTALL
|
|
@ -50,15 +50,7 @@ If you do not have access to the online version, follow the following recipies.
|
|||
|
||||
|
||||
* Cross-compile for the iOS platform (needs Xcode 11 or higher)
|
||||
1. Build the host ECL
|
||||
#+BEGIN_SRC shell-script
|
||||
./configure CFLAGS="-DECL_C_COMPATIBLE_VARIADIC_DISPATCH" --prefix=`pwd`/ecl-iOS-host --disable-c99complex
|
||||
make -j9
|
||||
make install
|
||||
rm -r build
|
||||
export ECL_TO_RUN=`pwd`/ecl-iOS-host/bin/ecl
|
||||
#+END_SRC
|
||||
2. Configure the toolchain
|
||||
1. Configure the toolchain
|
||||
#+BEGIN_SRC shell-script
|
||||
export IOS_VERSION_MIN="8.0"
|
||||
export IOS_SDK_DIR="`xcode-select --print-path`/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/"
|
||||
|
|
@ -75,10 +67,11 @@ If you do not have access to the online version, follow the following recipies.
|
|||
export LDFLAGS="-arch arm64 -pipe -std=c99 -gdwarf-2 -isysroot ${IOS_SDK_DIR}"
|
||||
export LIBS="-framework Foundation"
|
||||
#+END_SRC
|
||||
3. Build and install the target library
|
||||
2. Build and install the target library
|
||||
#+BEGIN_SRC shell-script
|
||||
export CFLAGS="$CFLAGS -DGC_DISABLE_INCREMENTAL -DECL_RWLOCK"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
export ECL_TO_RUN=/usr/local/bin/ecl
|
||||
./configure --host=aarch64-apple-darwin \
|
||||
--prefix=`pwd`/ecl-iOS \
|
||||
--disable-c99complex \
|
||||
|
|
@ -87,7 +80,7 @@ If you do not have access to the online version, follow the following recipies.
|
|||
make -j9
|
||||
make install
|
||||
#+END_SRC
|
||||
4. Library and assets in the ecl-iOS directory are ready to run on
|
||||
3. Library and assets in the ecl-iOS directory are ready to run on
|
||||
the iOS system.
|
||||
|
||||
* Cross-compile for the WASM platform (via emscripten)
|
||||
|
|
@ -118,17 +111,7 @@ Emscripten target is a little fickle so keep in mind that:
|
|||
garbage collector to work correctly and tend slow down the program
|
||||
(might be worth experimenting with the optimization options)
|
||||
|
||||
1. Build the host ECL
|
||||
|
||||
#+begin_src shell-script
|
||||
./configure ABI=32 CFLAGS="-m32 -g -O2 -DECL_C_COMPATIBLE_VARIADIC_DISPATCH" LDFLAGS="-m32 -g -O2" \
|
||||
--prefix=`pwd`/ecl-emscripten-host --disable-threads
|
||||
|
||||
make -j16 && make install
|
||||
rm -rf build/
|
||||
#+end_src
|
||||
|
||||
2. Configure the toolchain
|
||||
1. Configure the toolchain
|
||||
|
||||
Install the Emscripten SDK using the official instructions:
|
||||
|
||||
|
|
@ -141,14 +124,14 @@ After that activate the toolchain and configure build flags:
|
|||
|
||||
#+begin_src shell-script
|
||||
source ${EMSDK_PATH}/emsdk_env.sh
|
||||
export ECL_TO_RUN=`pwd`/ecl-emscripten-host/bin/ecl
|
||||
# You may customize various emscripten flags here, i.e:
|
||||
# export LDFLAGS="-sASYNCIFY=1"
|
||||
#+end_src
|
||||
|
||||
3. Build the core environment and install it
|
||||
2. Build the core environment and install it
|
||||
|
||||
#+begin_src shell-script
|
||||
export ECL_TO_RUN=/usr/local/bin/ecl
|
||||
emconfigure ./configure \
|
||||
--host=wasm32-unknown-emscripten \
|
||||
--build=x86_64-pc-linux-gnu \
|
||||
|
|
@ -164,7 +147,7 @@ After that activate the toolchain and configure build flags:
|
|||
cp build/bin/ecl.js build/bin/ecl.wasm ecl-emscripten/
|
||||
#+end_src
|
||||
|
||||
4. ECL may be hosted on a web page. Assuming that you have quicklisp installed:
|
||||
3. ECL may be hosted on a web page. Assuming that you have quicklisp installed:
|
||||
|
||||
#+begin_src shell-script
|
||||
export WEBSERVER=`pwd`/src/util/webserver.lisp
|
||||
|
|
@ -178,7 +161,7 @@ After that activate the toolchain and configure build flags:
|
|||
If the output does not show on the webpage then open the javascript console.
|
||||
This is a default html website produced by emscripten.
|
||||
|
||||
5. Build an external program linked against libecl.a
|
||||
4. Build an external program linked against libecl.a
|
||||
|
||||
The default stack size proposed by emscripten is 64KB. This is too little for
|
||||
ECL, so when you build a program that is linked against libecl.a, then it is
|
||||
|
|
|
|||
|
|
@ -157,14 +157,9 @@ and are ready to run on the Android system.
|
|||
|
||||
The cross-compilation steps for iOS are similar to those for Android.
|
||||
|
||||
Build the host ECL:
|
||||
@example
|
||||
@verbatim
|
||||
./configure CFLAGS="-DECL_C_COMPATIBLE_VARIADIC_DISPATCH" --prefix=`pwd`/ecl-iOS-host --disable-c99complex
|
||||
make -j9
|
||||
make install
|
||||
rm -r build
|
||||
export ECL_TO_RUN=`pwd`/ecl-iOS-host/bin/ecl
|
||||
export ECL_TO_RUN=/usr/local/bin/ecl
|
||||
@end verbatim
|
||||
@end example
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue