Statistics
| Branch: | Tag: | Revision:

root / configure-cell-cross @ 6df0423f

History | View | Annotate | Download (1.9 kB)

1
#!/bin/bash
2
3
#
4
# Before trying to use this script, please follow the instructions at
5
# http://gnuradio.org/trac/wiki/CrossCompilingForCell
6
#
7
8
scriptdir=`dirname $0`
9
10
prefix=
11
for arg in "$@"
12
do
13
  case $arg in
14
    --prefix=*)
15
      prefix=${arg#--prefix=}
16
      ;;
17
    --help)
18
      $scriptdir/configure --help
19
      exit
20
      ;;
21
  esac
22
done
23
24
if test x$prefix = x
25
then
26
  echo "usage: $0 --prefix=PREFIX [configure options...]" 1>&2
27
  exit 1
28
fi
29
30
31
arch=ppu
32
cell_root=/mnt/cell-root
33
python_version=2.5
34
compiler_includes="-isystem ${cell_root}/usr/include"
35
36
# check for 4.3 versions of cross-compilers and use them if we've got them
37
if which ppu32-gcc43 >/dev/null 2>&1; then
38
  ppu32_gcc=ppu32-gcc43
39
else
40
  ppu32_gcc=ppu32-gcc
41
fi
42
43
if which ppu32-g++43 >/dev/null 2>&1; then
44
  ppu32_gxx=ppu32-g++43
45
else
46
  ppu32_gxx=ppu32-g++
47
fi
48
49
$scriptdir/configure			    \
50
    CC=${ppu32_gcc}                         \
51
    CXX=${ppu32_gxx}                        \
52
    AR=${arch}-ar                           \
53
    NM=${arch}-nm                           \
54
    RANLIB=${arch}-ranlib                   \
55
    STRIP=${arch}-strip                     \
56
    F77=false                               \
57
    CPPFLAGS="$compiler_includes"							\
58
    LDFLAGS="-L${cell_root}/lib -L${cell_root}/usr/lib"                                 \
59
    PYTHON_CPPFLAGS=-I${cell_root}/usr/include/python${python_version}                  \
60
    PKG_CONFIG_PATH=${cell_root}/usr/lib/pkgconfig:${cell_root}/usr/local/lib/pkgconfig \
61
    --host=powerpc64-unknown-linux-gnu							\
62
    --with-pythondir=$prefix/lib/python${python_version}/site-packages			\
63
    --disable-gr-video-sdl \
64
    --disable-gr-audio-portaudio \
65
    --disable-gr-audio-jack \
66
    --disable-usrp2-firmware \
67
    "$@"
68
69
70
# Hack the libtool script so that it doesn't code an --rpath flag into anything
71
72
#sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
73
#sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool