update CHANGELOG, INSTALL and cross config for iOS
This commit is contained in:
parent
0b33cdf6f6
commit
4f8b4fab8b
3 changed files with 79 additions and 1 deletions
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
* Pending changes since 16.1.3
|
||||
** Enhancements
|
||||
- iOS support thanks to the help of P. Ruetz and gitlab user Whimse
|
||||
- hash-table may now have a custom equivalence predicate
|
||||
- ~make-load-form-with-slots~ works for structs even if slot names are not interned
|
||||
- ~ext:weak-pointer-value~ returns two values (value and its presence)
|
||||
|
|
|
|||
58
INSTALL
58
INSTALL
|
|
@ -65,5 +65,61 @@ MacPort command:
|
|||
#+BEGIN_SRC shell-script
|
||||
sudo port select --set gcc none
|
||||
#+END_SRC
|
||||
|
||||
|
||||
Hint provided by Pascal J. Bourguignon.
|
||||
|
||||
|
||||
* Cross-compile for the iOS platform
|
||||
1. Build the host ECL
|
||||
#+BEGIN_SRC shell-script
|
||||
./configure --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
|
||||
#+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/"
|
||||
|
||||
export CC="clang"
|
||||
export CXX="clang++"
|
||||
|
||||
export CFLAGS="-arch arm64 -miphoneos-version-min=${IOS_VERSION_MIN} -isysroot ${IOS_SDK_DIR}"
|
||||
export CFLAGS="$CFLAGS -pipe -Wno-trigraphs -Wreturn-type -Wunused-variable"
|
||||
export CFLAGS="$CFLAGS -fpascal-strings -fasm-blocks -fmessage-length=0 -fvisibility=hidden"
|
||||
export CFLAGS="$CFLAGS -O2 -DNO_ASM"
|
||||
|
||||
export LD="ld"
|
||||
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
|
||||
#+BEGIN_SRC shell-script
|
||||
export CFLAGS="$CFLAGS -DECL_C_COMPATIBLE_VARIADIC_DISPATCH -DGC_DISABLE_INCREMENTAL -DECL_RWLOCK"
|
||||
export CXXFLAGS="$CFLAGS"
|
||||
./configure --host=aarch64-apple-darwin \
|
||||
--prefix=`pwd`/ecl-iOS \
|
||||
--disable-c99complex \
|
||||
--disable-shared \
|
||||
--with-cross-config=`pwd`/src/util/iOS-arm64.cross_config
|
||||
make -j9
|
||||
make install
|
||||
#+END_SRC
|
||||
4. Library and assets in the ecl-iOS directory are ready to run on
|
||||
the iOS system.
|
||||
|
||||
** Using ECL on iOS
|
||||
|
||||
The Boehm-Demers-Weiser garbage collector cannot find the stack base
|
||||
automatically on iOS. Therefore, this has to be specified manually. In
|
||||
the main function, before calling cl_boot, add e.g. (see the garbage
|
||||
collector documentation for more details):
|
||||
#+BEGIN_SRC C
|
||||
const int size = 256;
|
||||
char* ecl_argv[size];
|
||||
GC_allow_register_threads();
|
||||
GC_register_my_thread((const struct GC_stack_base*)ecl_argv);
|
||||
GC_stackbottom = (char*)(ecl_argv + size - 1);
|
||||
#+END_SRC
|
||||
21
src/util/iOS-arm64.cross_config
Normal file
21
src/util/iOS-arm64.cross_config
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
ECL_STACK_DIR=down
|
||||
CL_FIXNUM_TYPE=long
|
||||
CL_FIXNUM_BITS=64
|
||||
CL_FIXNUM_MAX=2305843009213693951L
|
||||
CL_FIXNUM_MIN=-2305843009213693952L
|
||||
CL_INT_BITS=32
|
||||
CL_LONG_BITS=64
|
||||
ECL_BIGENDIAN=no
|
||||
ECL_NEWLINE=LF
|
||||
ECL_FILE_CNT=0
|
||||
ECL_STDINT_HEADER="#include <stdint.h>"
|
||||
ECL_UINT8_T=uint8_t
|
||||
ECL_UINT16_T=uint16_t
|
||||
ECL_UINT32_T=uint32_t
|
||||
ECL_UINT64_T=uint64_t
|
||||
ECL_INT8_T=int8_t
|
||||
ECL_INT16_T=int16_t
|
||||
ECL_INT32_T=int32_t
|
||||
ECL_INT64_T=int64_t
|
||||
ECL_LONG_LONG_BITS=no
|
||||
ECL_WORKING_ENVIRON=yes
|
||||
Loading…
Add table
Reference in a new issue