Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Unified Diff: ports/tor/build.sh

Issue 1226403004: Added (libevent,tor) and modified glibc-compat (Closed) Base URL: https://chromium.googlesource.com/external/naclports.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ports/tor/build.sh
diff --git a/ports/tor/build.sh b/ports/tor/build.sh
new file mode 100644
index 0000000000000000000000000000000000000000..c301d727d5e9bc42a956f86b8e276f60ab07b7d3
--- /dev/null
+++ b/ports/tor/build.sh
@@ -0,0 +1,56 @@
+# Copyright (c) 2015 The Native Client Authors. All rights reserved.
Sam Clegg 2015/07/16 00:26:30 nit: drop the (c)
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+NACLPORTS_CPPFLAGS+=" -Dmain=nacl_main"
+export LIBS="${NACL_CLI_MAIN_LIB}"
+
+ConfigureStep() {
+ EXTRA_CONFIGURE_ARGS+=" --disable-tool-name-check --disable-system-torrc"
+
+# TODO(dt) fix the problem in (explicit) static linking of openssl
+# and libevent when TOOLCHAIN=glibc
+ if [ "${NACL_LIBC}" = "newlib" ]; then
+ EXTRA_CONFIGURE_ARGS+=" --enable-static-tor \
+ --enable-static-libevent --with-libevent-dir=${NACL_PREFIX} \
+ --enable-static-openssl --with-openssl-dir=${NACL_PREFIX} \
+ --enable-static-zlib --with-zlib-dir=${NACL_PREFIX}"
+ NACLPORTS_CPPFLAGS+=" -I${NACLPORTS_INCLUDE}/glibc-compat"
+ export LIBS+=" -lglibc-compat"
+ fi
+
+# if unit test causes trouble (in pepper_canary)
+# EXTRA_CONFIGURE_ARGS+ =" --disable-unittests"
+
+# libssp required
+# TODO(dt) remove this flag once this issue is solved
+ EXTRA_CONFIGURE_ARGS+=" --disable-gcc-hardening"
Sam Clegg 2015/07/16 00:26:30 I would just set all this stuff at the global scop
+
+ DefaultConfigureStep
+}
+
+SetOptFlags() {
+#tor doesn't like NDEBUG, thus avoiding it for now
+ if IsCMakeProject; then
+ return
+ fi
+
+ if [ "${NACL_DEBUG}" = "1" ]; then
+ NACLPORTS_CFLAGS+=" -g -O0"
+ NACLPORTS_CXXFLAGS+=" -g -O0"
+ else
+# NACLPORTS_CFLAGS+=" -DNDEBUG -O2"
+ NACLPORTS_CFLAGS+=" -O2"
+# NACLPORTS_CXXFLAGS+=" -DNDEBUG -O2"
+ NACLPORTS_CXXFLAGS+=" -O2"
+ if [ "${NACL_ARCH}" = "pnacl" ]; then
+# NACLPORTS_LDFLAGS+=" -DNDEBUG -O2"
+ NACLPORTS_LDFLAGS+=" -O2"
+ fi
+ fi
+}
+
+BuildStep() {
+ SetOptFlags
+ DefaultBuildStep
Sam Clegg 2015/07/16 00:26:30 Probably cleaner to do it removing the NDEBUG (see
+}
« ports/libevent/build.sh ('K') | « ports/libevent/pkg_info ('k') | ports/tor/nacl.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698