GHC unix lib uses `ccall` ffi which ignores include indirection. It
directly links against available symbols during compile.
Although, directly linking to `libandroid-posix-semaphore` should work
too, but that depends upon library load order during runtime, i.e if
`libc` is loaded before (very unlikely, unless LD_PRELOAD is set)
`libandroid-posix-semaphore`, it would use sem_{open,close,unlink} from
it, which isn't implemented.
So, to be sure that it always links against `libandroid-posix-semaphore`
symbols, I have patched it to use `capi` ffi which considers include
indirections.
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>
This reverts commit 3f8aeb2fb2.
`lib/ghc-8.10.7/unix-2.7.2.2/libHSunix-2.7.2.2-ghc8.10.7.so` continues
referencing libc symbols, i.e. `sem_{open,close,unlink}`, regardless of
declarations in `<semaphore.h>`.
%ci:no-build
- seperate ghc libraries from ghc bins
- enable dynamic libs for ghc
* ghc-libs is further seperated into static and dynamic packages
* enabling dynamic support will reduce package size as well as there
performance on device.
closes#5973
Signed-off-by: Aditya Alok <dev.aditya.alok@gmail.com>