From c67f060e2dd09c15fcd73ccdcfe7ef2c13d4f44c Mon Sep 17 00:00:00 2001 From: Frank Celler Date: Sun, 13 Oct 2013 08:42:29 +0000 Subject: [PATCH] added modifications for raspberry --- 3rdParty/Makefile.all-in-one-v8 | 4 ++++ m4/all-in-one.v8 | 6 +++++- m4/configure.basics | 16 +++++++++++++++- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/3rdParty/Makefile.all-in-one-v8 b/3rdParty/Makefile.all-in-one-v8 index e0cdb4ae79..b61461dc3d 100644 --- a/3rdParty/Makefile.all-in-one-v8 +++ b/3rdParty/Makefile.all-in-one-v8 @@ -19,7 +19,11 @@ BUILT_SOURCES += @V8_LIBS@ @echo "--------------------------------------------------------------------------------" @echo +if ENABLE_ARM + cd @top_srcdir@/3rdParty/V8 && CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" GYP_DEFINES="armv7=0" $(MAKE) library=static strictaliasing=off snapshot=off werror=no hardfp=on @V8_TARGET@ +else cd @top_srcdir@/3rdParty/V8 && CFLAGS="-O2 -g" CXXFLAGS="-O2 -g" $(MAKE) library=static strictaliasing=off snapshot=off werror=no @V8_TARGET@ +endif touch @srcdir@/.v8-build-@TRI_BITS@ diff --git a/m4/all-in-one.v8 b/m4/all-in-one.v8 index 0575c055b2..6d514b340b 100644 --- a/m4/all-in-one.v8 +++ b/m4/all-in-one.v8 @@ -8,7 +8,11 @@ V8_CPPFLAGS="-I${srcdir}/3rdParty/V8/include" V8_LDFLAGS="" V8_TARGET="native" -if test x$tr_DARWIN == xyes; then +if test x$tr_ARM == xyes; then + V8_TARGET="arm.release" + + V8_LIBS="${srcdir}/3rdParty/V8/out/$V8_TARGET/obj.target/tools/gyp/libv8_base.a ${srcdir}/3rdParty/V8/out/$V8_TARGET/obj.target/tools/gyp/libv8_nosnapshot.a" +elif test x$tr_DARWIN == xyes; then if test "x$tr_BITS" == x64; then V8_TARGET="x64.release" else diff --git a/m4/configure.basics b/m4/configure.basics index b351251bd2..d2247156e8 100644 --- a/m4/configure.basics +++ b/m4/configure.basics @@ -13,11 +13,12 @@ AC_CANONICAL_HOST AC_CANONICAL_TARGET dnl ---------------------------------------------------------------------------- -dnl check for MacOS X or FreeBSD +dnl check for special OS like MacOS X or FreeBSD dnl ---------------------------------------------------------------------------- tr_DARWIN="no" tr_FREEBSD="no" +tr_ARM="no" case $target in *-apple-darwin*) @@ -27,10 +28,15 @@ case $target in *-*-freebsd*) tr_FREEBSD="yes" ;; + + armv6l-*-linux-gnueabihf) + tr_ARM="yes" + ;; esac AM_CONDITIONAL(ENABLE_DARWIN, test "x$tr_DARWIN" = xyes) AM_CONDITIONAL(ENABLE_FREEBSD, test "x$tr_FREEBSD" = xyes) +AM_CONDITIONAL(ENABLE_ARM, test "x$tr_ARM" = xyes) dnl ---------------------------------------------------------------------------- dnl bits @@ -53,6 +59,14 @@ AC_SUBST(TRI_BITS) CPPFLAGS="${CPPFLAGS} -DTRI_BITS=${TRI_BITS}" +dnl ---------------------------------------------------------------------------- +dnl special flags +dnl ---------------------------------------------------------------------------- + +if test x$tr_ARM == xyes; then + CPPFLAGS="${CPPFLAGS} -DUSE_EABI_HARDFLOAT -march=armv6 -mfloat-abi=hard" +fi + dnl ---------------------------------------------------------------------------- dnl use automake to generate Makfile.in dnl ----------------------------------------------------------------------------