#!/bin/bash
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.


if [ "${NACL_GLIBC}" != "1" ]; then
   NACLPORTS_CFLAGS+=" -I${NACLPORTS_INCLUDE}/glibc-compat"
   NACLPORTS_CFLAGS+=" -DBYTE_ORDER=LITTLE_ENDIAN"
   NACLPORTS_CXXFLAGS+=" -I${NACLPORTS_INCLUDE}/glibc-compat"
   NACLPORTS_CXXFLAGS+=" -DBYTE_ORDER=LITTLE_ENDIAN"
   export LIBS="-lnacl_io -lglibc-compat"
fi

ConfigureStep() {
  export CROSS_COMPILE=true
  EXTRA_CONFIGURE_ARGS+=" --disable-shared --enable-static --with-poller=poll"
  DefaultConfigureStep
}

#!/bin/bash
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.


export LIBS="-lnacl_io"

if [ "${NACL_GLIBC}" != "1" ]; then
   NACLPORTS_CFLAGS+=" -I${NACLPORTS_INCLUDE}/glibc-compat"
   NACLPORTS_CXXFLAGS+=" -I${NACLPORTS_INCLUDE}/glibc-compat"
   export LIBS="${LIBS} -lglibc-compat"
fi

if [ "{NACL_ARCH}" = "pnacl" ]; then
   NACLPORTS_CFLAGS+=" -DBYTE_ORDER=LITTLE_ENDIAN"
   NACLPORTS_CXXFLAGS+=" -DBYTE_ORDER=LITTLE_ENDIAN"
fi

NACLPORTS_CFLAGS+=" -DZMQ_FORCE_MUTEXES"
NACLPORTS_CXXFLAGS+=" -DZMQ_FORCE_MUTEXES"

ConfigureStep() {
  export CROSS_COMPILE=true
  EXTRA_CONFIGURE_ARGS+=" --disable-shared --enable-static --with-poller=poll"
  DefaultConfigureStep
}

Disable all ASM code for all archs in zeromq.
Disable all ASM code for all archs in zeromq.

This will disable all inline assembly in ZeroMQ.  Previously,
particularly on the ARM architecture, this was resulting in invalid NEXE
files being generated.

Additionally, this removes the BYTE_ORDER definitions except when
NACL_ARCH is PNaCl.

R=mcgrathr@chromium.org, sbc@chromium.org

Review URL: https://codereview.chromium.org/136193010

git-svn-id: 84b3587ce119b778414dcb50e18b7479aacf4f1d@1054 7dad1e8b-422e-d2af-fbf5-8013b78bd812
