v8: add arm cross build support (from pancake).
This commit is contained in:
parent
ba852e1d66
commit
918b2782c7
1 changed files with 38 additions and 6 deletions
|
@ -20,17 +20,49 @@ long_desc="
|
||||||
|
|
||||||
This package contains v8 the utilities mksnapshot and the d8 shell."
|
This package contains v8 the utilities mksnapshot and the d8 shell."
|
||||||
|
|
||||||
makedepends="which subversion python readline-devel"
|
hostmakedepends="which subversion python"
|
||||||
|
makedepends="readline-devel"
|
||||||
|
|
||||||
do_build() {
|
do_build() {
|
||||||
|
# TODO: add support to crosscompile for other targets.
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
case "${XBPS_TARGET_MACHINE}" in
|
||||||
|
arm*)
|
||||||
|
# NOTE: hardfp can be problematic if not hf is supported on target cpu
|
||||||
|
sed -e "s/m32flag':.*/m32flag':'',/" -i build/common.gypi
|
||||||
|
LINK="${CXX}" make V=1 ${makejobs} arm.release \
|
||||||
|
hardfp=on library=shared console=readline \
|
||||||
|
disassembler=on snapshot=off \
|
||||||
|
CXX.host=${CXX} CXX.link=${CXX} LINK.target="${CXX}"
|
||||||
|
;;
|
||||||
|
*) msg_error "$pkgver: cannot cross compile for ${XBPS_TARGET_MACHINE}.\n"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
# native build
|
||||||
make ${makejobs} native library=shared console=readline \
|
make ${makejobs} native library=shared console=readline \
|
||||||
disassembler=on liveobjectlist=on
|
disassembler=on liveobjectlist=on
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
if [ "$CROSS_BUILD" ]; then
|
||||||
|
case "$XBPS_TARGET_MACHINE" in
|
||||||
|
arm*)
|
||||||
|
vinstall out/arm.release/d8 755 usr/bin
|
||||||
|
vinstall out/arm.release/lib.target/lib${pkgname}.so 755 usr/lib
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
# native build
|
||||||
vinstall out/native/d8 755 usr/bin
|
vinstall out/native/d8 755 usr/bin
|
||||||
vinstall out/native/mksnapshot 755 usr/bin
|
|
||||||
vinstall out/native/lib.target/lib${pkgname}.so 755 usr/lib
|
vinstall out/native/lib.target/lib${pkgname}.so 755 usr/lib
|
||||||
|
fi
|
||||||
|
if [ -z "$CROSS_BUILD" ]; then
|
||||||
|
# mksnapshot only built in native builds.
|
||||||
|
vinstall out/native/mksnapshot 755 usr/bin
|
||||||
|
fi
|
||||||
|
|
||||||
vinstall include/${pkgname}-debug.h 644 usr/include
|
vinstall include/${pkgname}-debug.h 644 usr/include
|
||||||
vinstall include/${pkgname}-preparser.h 644 usr/include
|
vinstall include/${pkgname}-preparser.h 644 usr/include
|
||||||
vinstall include/${pkgname}-profiler.h 644 usr/include
|
vinstall include/${pkgname}-profiler.h 644 usr/include
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue