1
0
Fork 0

finalize ARM crosscompiling

This commit is contained in:
Wilfried Goesgens 2016-12-07 14:52:45 +01:00
parent f62b56ac73
commit 1b7a0eec23
3 changed files with 49 additions and 25 deletions

View File

@ -99,9 +99,10 @@ set(CMAKE_USE_OPENSSL ON CACHE type BOOL)
# mop: super important...if this is off curl will not handle request timeouts < 1000ms
set(ENABLE_THREADED_RESOLVER ON CACHE type BOOL)
# bugfix for HAVE_POSIX_STRERROR_R define on cross compiling.
if (CROSS_COMPILING)
add_definitions("-DHAVE_POSIX_STRERROR_R=1")
endif()
#if (CROSS_COMPILING)
# add_definitions("-DHAVE_POSIX_STRERROR_R=1")
# add_definitions("-DHAVE_POSIX_STRERROR_R__TRYRUN_OUTPUT=TRUE")
#endif()
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/curl/curl-7.50.3)
################################################################################

View File

@ -323,13 +323,9 @@ while [ $# -gt 0 ]; do
CLEAN_IT=1
shift
;;
--xcArmV8)
ARMV8=1
XCGCC=1
--xcArm)
shift
;;
--xcArmV7)
ARMV7=1
TOOL_PREFIX=$1
XCGCC=1
shift
;;
@ -390,18 +386,18 @@ elif [ "$CLANG36" == 1 ]; then
CXXFLAGS="${CXXFLAGS} -std=c++11"
elif [ "${XCGCC}" = 1 ]; then
USE_JEMALLOC=0
if [ "${ARMV8}" = 1 ]; then
export TOOL_PREFIX=aarch64-linux-gnu
BUILD_DIR="${BUILD_DIR}-ARMV8"
elif [ "${ARMV7}" = 1 ]; then
export TOOL_PREFIX=aarch64-linux-gnu
BUILD_DIR="${BUILD_DIR}-ARMV7"
else
echo "Unknown XC-Compiler!"
exit 1;
fi
BUILD_DIR="${BUILD_DIR}-${TOOL_PREFIX}"
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DCROSS_COMPILING=true" # -DCMAKE_LIBRARY_ARCHITECTURE=${TOOL_PREFIX} "
# tell cmake we're cross compiling:
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DCROSS_COMPILING=true -DCMAKE_SYSTEM_NAME=Linux"
# -DCMAKE_LIBRARY_ARCHITECTURE=${TOOL_PREFIX} "
# these options would be evaluated using TRY_RUN(), which obviously doesn't work:
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DHAVE_POLL_FINE_EXITCODE=0"
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DHAVE_GLIBC_STRERROR_R=0"
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DHAVE_GLIBC_STRERROR_R__TRYRUN_OUTPUT=TRUE"
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DHAVE_POSIX_STRERROR_R=1"
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DHAVE_POSIX_STRERROR_R__TRYRUN_OUTPUT=FALSE"
export CXX=$TOOL_PREFIX-g++
export AR=$TOOL_PREFIX-ar
export RANLIB=$TOOL_PREFIX-ranlib
@ -409,13 +405,9 @@ elif [ "${XCGCC}" = 1 ]; then
export LD=$TOOL_PREFIX-g++
export LINK=$TOOL_PREFIX-g++
export STRIP=$TOOL_PREFIX-strip
# we need ARM LD:
GOLD=0;
# tell cmake we're cross compiling:
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DCROSS_COMPILING=true"
# V8's mksnapshot won't work - ignore it:
MAKE_PARAMS="${MAKE_PARAMS} -i"
fi
@ -470,9 +462,11 @@ if [ -z "${MSVC}" ]; then
if [ ! -f ${STRIP} ] ; then
STRIP=`which strip`
fi
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DCMAKE_STRIP=${STRIP}"
export STRIP
fi
if test -n "${STRIP}"; then
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} -DCMAKE_STRIP=${STRIP}"
fi
fi
CONFIGURE_OPTIONS="${CONFIGURE_OPTIONS} ${MAINTAINER_MODE}"

29
scripts/build-xc-deb.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash
set -e
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd ${DIR}/..
EP=""
for i in $@; do
if test "$i" == "--enterprise"; then
EP="EP"
fi
done
./Installation/Jenkins/build.sh \
standard \
--rpath \
--parallel 25 \
--package DEB \
$SNAP \
--xcArm arm-linux-gnueabihf \
--buildDir build-${EP}deb \
--targetDir /var/tmp/ \
--noopt \
$@
cd ${DIR}/..