summaryrefslogtreecommitdiff
path: root/configure-cell-cross
blob: fd03588fb03521f1b17196ed2752b44d68c20a82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash

#
# Before trying to use this script, please follow the instructions at
# http://gnuradio.org/trac/wiki/CrossCompilingForCell
#

scriptdir=`dirname $0`

prefix=
for arg in "$@"
do
  case $arg in
    --prefix=*)
      prefix=${arg#--prefix=}
      ;;
    --help)
      $scriptdir/configure --help
      exit
      ;;
  esac
done

if test x$prefix = x
then
  echo "usage: $0 --prefix=PREFIX [configure options...]" 1>&2
  exit 1
fi


arch=ppu
cell_root=/mnt/cell-root
python_version=2.5
compiler_includes="-isystem ${cell_root}/usr/include"

# check for 4.3 versions of cross-compilers and use them if we've got them
if which ppu32-gcc43 >/dev/null 2>&1; then
  ppu32_gcc=ppu32-gcc43
else
  ppu32_gcc=ppu32-gcc
fi

if which ppu32-g++43 >/dev/null 2>&1; then
  ppu32_gxx=ppu32-g++43
else
  ppu32_gxx=ppu32-g++
fi

$scriptdir/configure			    \
    CC=${ppu32_gcc}                         \
    CXX=${ppu32_gxx}                        \
    AR=${arch}-ar                           \
    NM=${arch}-nm                           \
    RANLIB=${arch}-ranlib                   \
    STRIP=${arch}-strip                     \
    F77=false                               \
    CPPFLAGS="$compiler_includes"							\
    LDFLAGS="-L${cell_root}/lib -L${cell_root}/usr/lib"                                 \
    PYTHON_CPPFLAGS=-I${cell_root}/usr/include/python${python_version}                  \
    PKG_CONFIG_PATH=${cell_root}/usr/lib/pkgconfig:${cell_root}/usr/local/lib/pkgconfig \
    --host=powerpc64-unknown-linux-gnu							\
    --with-pythondir=$prefix/lib/python${python_version}/site-packages			\
    --disable-gr-video-sdl \
    --disable-gr-audio-portaudio \
    --disable-gr-audio-jack \
    --disable-usrp2-firmware \
    "$@"


# Hack the libtool script so that it doesn't code an --rpath flag into anything

#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool