#!/bin/sh # This is an automatically-generated cross-configuration setup script ################################################ # Usage Instructions: # 1. fill in the following values to point to the target and host compilers: CC='arm-linux-gnu-gcc' ; export CC # vanilla target C compiler CXX='arm-linux-gnu-g++' ; export CXX # vanilla target C++ compiler # Host C compiler # NOTE: you may need to set GCC_EXEC_PREFIX=/usr/bin/ # to get the correct assembler if gcc is your host compiler HOST_CC='/usr/bin/gcc' ; export HOST_CC HOST_CFLAGS='-g -O2' ; export HOST_CFLAGS # Host C++ compiler - required by Titanium, not required for UPC or GASNet HOST_CXX='/usr/bin/g++' ; export HOST_CXX HOST_CXXFLAGS='' ; export HOST_CXXFLAGS # Optional additional settings: (see configure --help for complete list) #MPI_CC='mpicc' ; export MPI_CC # MPI-enabled C compiler #MPI_CFLAGS='' ; export MPI_CFLAGS # flags for MPI_CC #MPI_LIBS='' ; export MPI_LIBS # libs for linking with MPI_CC #MPIRUN_CMD='mpirun -np %N %C' ; export MPIRUN_CMD # launch command for MPI jobs EXTRA_CONFIGURE_ARGS='' ; export EXTRA_CONFIGURE_ARGS # misc configure args to pass # 2. Fill in the canonical target machine type. You can usually obtain this # by running config-aux/config.guess on the target machine TARGET_ID='arm-linux-gnu' # 3. Optionally cross-compile and run the detect-cachesz.c utility and # fill in the value below and uncomment. If not set the default is platform-dependent. CACHE_LINE_BYTES=32; export CACHE_LINE_BYTES # 4. Review the automatically-detected settings below and make corrections as necessary. # 5. Place this output script in your top-level source directory and run it, # passing it any additional configure arguments as usual (see configure --help). ################################################ # AUTOMATICALLY DETECTED SETTINGS: # Whether the ARM system has working kernel support for cmpxchg CROSS_HAVE_ARM_CMPXCHG='1' ; export CROSS_HAVE_ARM_CMPXCHG # Whether the ARM system has working kernel support for memory barriers CROSS_HAVE_ARM_MEMBAR='1' ; export CROSS_HAVE_ARM_MEMBAR # Whether the system has a working version of anonymous mmap CROSS_HAVE_MMAP='1' ; export CROSS_HAVE_MMAP # The system VM page size (ie mmap granularity, even if swapping is not supported) CROSS_PAGESIZE='4096' ; export CROSS_PAGESIZE # Does the system stack grow up? CROSS_STACK_GROWS_UP='0' ; export CROSS_STACK_GROWS_UP # Is char a signed type? CROSS_CHAR_IS_SIGNED='0' ; export CROSS_CHAR_IS_SIGNED # Basic primitive C type sizes (in bytes) CROSS_SIZEOF_CHAR='1' ; export CROSS_SIZEOF_CHAR CROSS_SIZEOF_SHORT='2' ; export CROSS_SIZEOF_SHORT CROSS_SIZEOF_INT='4' ; export CROSS_SIZEOF_INT CROSS_SIZEOF_LONG='4' ; export CROSS_SIZEOF_LONG CROSS_SIZEOF_LONG_LONG='8' ; export CROSS_SIZEOF_LONG_LONG CROSS_SIZEOF_VOID_P='4' ; export CROSS_SIZEOF_VOID_P CROSS_SIZEOF_SIZE_T='4' ; export CROSS_SIZEOF_SIZE_T CROSS_SIZEOF_PTRDIFF_T='4' ; export CROSS_SIZEOF_PTRDIFF_T # System signal values CROSS_SIGHUP='1' ; export CROSS_SIGHUP CROSS_SIGINT='2' ; export CROSS_SIGINT CROSS_SIGQUIT='3' ; export CROSS_SIGQUIT CROSS_SIGKILL='9' ; export CROSS_SIGKILL CROSS_SIGTERM='15' ; export CROSS_SIGTERM CROSS_SIGUSR1='10' ; export CROSS_SIGUSR1 # Find source directory if test -z "$SRCDIR" || test ! -f "$SRCDIR/configure" ; then SRCDIR=`dirname $0` fi if test ! -f "$SRCDIR/configure" ; then echo "ERROR: Source directory not found. Either set \$SRCDIR=/path/to/src or copy/link the `basename $0` script to the same directory as the configure script" exit 1 fi # Detect the build+host machine type HOST_APPEND= for sys in host build; do SYS_ARG=`echo "$@" | grep -i -e --$sys` if test -z "$SYS_ARG"; then if test -z "$HOST_ID"; then HOST_ID=`env CC= HOST_CC= CC_FOR_BUILD= $SRCDIR/config-aux/config.guess` if test -z "$HOST_ID"; then echo 'ERROR: failed to auto-detect build host. Please run with --host=machineid --build=machineid to identify the host machine running this script' exit 1 fi fi HOST_APPEND="$HOST_APPEND --$sys=$HOST_ID" fi done # Now that everything is setup, run the actual configure script $SRCDIR/configure --enable-cross-compile$HOST_APPEND --target=$TARGET_ID $EXTRA_CONFIGURE_ARGS "$@"