gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-akono] branch master updated (4e707c84 -> 0647cb31)


From: gnunet
Subject: [GNUnet-SVN] [taler-akono] branch master updated (4e707c84 -> 0647cb31)
Date: Wed, 03 Apr 2019 16:13:15 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a change to branch master
in repository akono.

 discard 4e707c84 build script and patches
     new 0647cb31 build script and patches

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4e707c84)
            \
             N -- N -- N   refs/heads/master (0647cb31)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 deps/.gitignore                                   |  1 +
 deps/README.md                                    | 14 +++++
 deps/build_node                                   | 70 +++++++++--------------
 deps/node/common.gypi                             |  8 +--
 deps/node/deps/cares/config/android/ares_config.h |  2 +-
 deps/node/node.gyp                                |  4 --
 deps/node/node.gypi                               |  3 +
 7 files changed, 49 insertions(+), 53 deletions(-)
 create mode 100644 deps/.gitignore
 create mode 100644 deps/README.md

diff --git a/deps/.gitignore b/deps/.gitignore
new file mode 100644
index 00000000..fb17e1f5
--- /dev/null
+++ b/deps/.gitignore
@@ -0,0 +1 @@
+android-toolchain/
diff --git a/deps/README.md b/deps/README.md
new file mode 100644
index 00000000..3325702b
--- /dev/null
+++ b/deps/README.md
@@ -0,0 +1,14 @@
+Building node for Android isn't officially supported, so there are some 
difficulties:
+
+* Node tries to build v8 via gyp, but the gyp build is broken for 
cross-compiling to Android.
+  Also, the V8 team doesn't maintain the gyp build files anymore.  Only the gn 
build (gn is Chromium's build
+  tool) works.
+* The --build-v8-with-gn option for node is also broken.
+
+
+We build node with the --without-bundled-v8 option.  This is necessary since we
+manually have to compile the bundled v8.
+
+
+Resources:
+* https://v8.dev/docs/cross-compile-arm
diff --git a/deps/build_node b/deps/build_node
index b67694d5..40363be6 100755
--- a/deps/build_node
+++ b/deps/build_node
@@ -2,66 +2,48 @@
 
 set -euf -o pipefail
 
-NDK_PATH=$1
+NDK=$1
 
-CC_VER="4.9"
-ARCH='arm'
-DEST_CPU='arm'
-TOOLCHAIN_NAME="$DEST_CPU-linux-androideabi"
-
-function make_toolchain {
-  $NDK_PATH/build/tools/make-standalone-toolchain.sh \
-    --toolchain=$TOOLCHAIN_NAME-$CC_VER \
-    --arch=arm \
-    --install-dir=$TOOLCHAIN \
-    --platform=android-26 \
-    --stl=libc++
-}
+DEST_CPU_ARCH='arm'
+API_LEVEL=26
+BUILD_HOST_TAG='linux-x86_64'
+TOOLCHAIN_DIR=$NDK/toolchains/llvm/prebuilt/$BUILD_HOST_TAG/
 
+if [[ ! -d "$NDK" ]]; then
+  echo "Android NDK directory '$NDK' invalid"
+  exit 1
+fi
 
-export TOOLCHAIN=$PWD/android-toolchain
-if [ -d "$TOOLCHAIN" ]; then
-  echo "NDK toolchain already exists."
-else
-    make_toolchain
+if [[ ! -d "$TOOLCHAIN_DIR" ]]; then
+  echo "Toolchain directory '$TOOLCHAIN_DIR' invalid"
+  exit 1
 fi
 
-export PATH=$PATH:$TOOLCHAIN/bin
-export AR=$TOOLCHAIN/bin/$TOOLCHAIN_NAME-ar
-export CC=$TOOLCHAIN/bin/$TOOLCHAIN_NAME-clang
-export CXX=$TOOLCHAIN/bin/$TOOLCHAIN_NAME-clang++
-export LD=$TOOLCHAIN/bin/$TOOLCHAIN_NAME-ld
-export LINK=$TOOLCHAIN/bin/$TOOLCHAIN_NAME-clang++
+# The naming of these isn't very consistent, as some tools start with arm,
+# others with arm7a.
+export AR=$TOOLCHAIN_DIR/bin/arm-linux-androideabi-ar
+export CC=$TOOLCHAIN_DIR/bin/armv7a-linux-androideabi$API_LEVEL-clang
+export CXX=$TOOLCHAIN_DIR/bin/armv7a-linux-androideabi$API_LEVEL-clang++
+export LD=$TOOLCHAIN_DIR/bin/arm-linux-androideabi-ld
+export LINK=$TOOLCHAIN_DIR/bin/armv7a-linux-androideabi$API_LEVEL-clang++
+export RANLIB=$TOOLCHAIN_DIR/bin/arm-linux-androideabi-ranlib
+export STRIP=$TOOLCHAIN_DIR/bin/arm-linux-androideabi-strip
 
-#export CFLAGS="-fPIE -fPIC"
-#export LDFLAGS="-pie"
+export LDFLAGS="-static-libstdc++"
 
 cd node
 
-echo CC $CC
-
-# In the current combination of node/v8, we can only build v8 with the gn build
-# system, even though node itself is built using gyp.
-
-GYP_DEFINES="target_arch=$ARCH"
-#GYP_DEFINES+=" v8_target_arch=$ARCH"
-GYP_DEFINES+=" android_target_arch=$ARCH"
-GYP_DEFINES+=" host_os=linux OS=android"
-GYP_DEFINES+=" clang=1"
-export GYP_DEFINES
-
-# --openssl-no-asm \
-# --build-v8-with-gn
-# --without-ssl \
+export GYP_DEFINES="OS=android clang=1"
 
 function myconf() {
   ./configure \
-      --dest-cpu=$DEST_CPU \
+      --dest-cpu=$DEST_CPU_ARCH \
       --dest-os=android \
       --without-snapshot \
       --without-intl \
       --openssl-no-asm \
-      --without-bundled-v8
+      --without-bundled-v8 \
+      --shared
 }
 
 if [ -z ${2+x} ]; then
diff --git a/deps/node/common.gypi b/deps/node/common.gypi
index 338ed2cb..36a773a4 100644
--- a/deps/node/common.gypi
+++ b/deps/node/common.gypi
@@ -123,8 +123,8 @@
             'ldflags': [ '-Wl,-bbigtoc' ],
           }],
           ['OS == "android"', {
-            'cflags': [ '-fPIE' ],
-            'ldflags': [ '-fPIE', '-pie' ]
+            'cflags': [ '-fPIC' ],
+            'ldflags': [ '-fPIC' ]
           }],
           ['node_shared=="true"', {
             'msvs_settings': {
@@ -198,8 +198,8 @@
             ],
           },],
           ['OS == "android"', {
-            'cflags': [ '-fPIE' ],
-            'ldflags': [ '-fPIE', '-pie' ]
+            'cflags': [ '-fPIC' ],
+            'ldflags': [ '-fPIC' ]
           }],
           ['node_shared=="true"', {
             'msvs_settings': {
diff --git a/deps/node/deps/cares/config/android/ares_config.h 
b/deps/node/deps/cares/config/android/ares_config.h
index c26a23b9..2d469d5c 100644
--- a/deps/node/deps/cares/config/android/ares_config.h
+++ b/deps/node/deps/cares/config/android/ares_config.h
@@ -128,7 +128,7 @@
 #define HAVE_GETNAMEINFO 1
 
 /* Define to 1 if you have the getservbyport_r function. */
-#undef HAVE_GETSERVBYPORT_R 0
+#undef HAVE_GETSERVBYPORT_R
 
 /* Define to 1 if you have the `gettimeofday' function. */
 #define HAVE_GETTIMEOFDAY 1
diff --git a/deps/node/node.gyp b/deps/node/node.gyp
index 9ff36d0d..61d232cd 100644
--- a/deps/node/node.gyp
+++ b/deps/node/node.gyp
@@ -266,7 +266,6 @@
         'src',
         'deps/v8/include'
       ],
-      'libraries' : [ 
'/home/dold/repos/akono/deps/node/deps/v8/out.gn/arm.release/obj/libv8_monolith.a'
 ],
       'dependencies': [ 'deps/histogram/histogram.gyp:histogram' ],
 
       # - "C4244: conversion from 'type1' to 'type2', possible loss of data"
@@ -366,7 +365,6 @@
         '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
         'deps/v8/include/'
       ],
-      'libraries' : [ 
'/home/dold/repos/akono/deps/node/deps/v8/out.gn/arm.release/obj/libv8_monolith.a'
 ],
       'dependencies': [ 'deps/histogram/histogram.gyp:histogram' ],
 
       'sources': [
@@ -994,8 +992,6 @@
         'deps/uv/include',
         '<(SHARED_INTERMEDIATE_DIR)', # for node_natives.h
       ],
-      'libraries' : [ 
'/home/dold/repos/akono/deps/node/deps/v8/out.gn/arm.release/obj/libv8_monolith.a'
 ],
-
       'defines': [ 'NODE_WANT_INTERNALS=1' ],
 
       'sources': [
diff --git a/deps/node/node.gypi b/deps/node/node.gypi
index c07b5ea7..5721a375 100644
--- a/deps/node/node.gypi
+++ b/deps/node/node.gypi
@@ -84,6 +84,9 @@
         }],
       ],
     }],
+    [ 'node_use_bundled_v8=="false"', {
+      'libraries' : [ 
'<!(pwd)/deps/v8/out.gn/arm.release/obj/libv8_monolith.a' ],
+    }],
     [ 'node_use_v8_platform=="true"', {
       'defines': [
         'NODE_USE_V8_PLATFORM=1',

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]