Skip to content

Commit 5902fd0

Browse files
let configure find the build & host settings on Raspberry Pi
1 parent eaad858 commit 5902fd0

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

build-prerequisites.sh

+26-14
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ umask 022
3535

3636
exec < /dev/null
3737

38+
39+
# Added for Raspberry Pi
40+
LIBRARY_PATH=/usr/lib/$(gcc -print-multiarch)
41+
CPATH=/usr/include/$(gcc -print-multiarch)
42+
export LIBRARY_PATH CPATH
43+
44+
3845
script_path=`cd $(dirname $0) && pwd -P`
3946
. $script_path/build-common.sh
4047

@@ -89,8 +96,8 @@ echo Task [I-1] /$HOST_NATIVE/gmp/
8996
rm -rf $BUILDDIR_NATIVE/gmp && mkdir -p $BUILDDIR_NATIVE/gmp
9097
pushd $BUILDDIR_NATIVE/gmp
9198

92-
CPPFLAGS="-fexceptions" $SRCDIR/$GMP/configure --build=$BUILD \
93-
--host=$HOST_NATIVE \
99+
# for Raspberry Pi, let configure find the build and host settings
100+
CPPFLAGS="-fexceptions" $SRCDIR/$GMP/configure \
94101
--prefix=$BUILDDIR_NATIVE/host-libs/usr \
95102
--enable-cxx \
96103
--disable-shared \
@@ -105,8 +112,8 @@ echo Task [I-2] /$HOST_NATIVE/mpfr/
105112
rm -rf $BUILDDIR_NATIVE/mpfr && mkdir -p $BUILDDIR_NATIVE/mpfr
106113
pushd $BUILDDIR_NATIVE/mpfr
107114

108-
$SRCDIR/$MPFR/configure --build=$BUILD \
109-
--host=$HOST_NATIVE \
115+
# for Raspberry Pi, let configure find the build and host settings
116+
$SRCDIR/$MPFR/configure \
110117
--target=$TARGET \
111118
--prefix=$BUILDDIR_NATIVE/host-libs/usr \
112119
--disable-shared \
@@ -122,8 +129,8 @@ echo Task [I-3] /$HOST_NATIVE/mpc/
122129
rm -rf $BUILDDIR_NATIVE/mpc && mkdir -p $BUILDDIR_NATIVE/mpc
123130
pushd $BUILDDIR_NATIVE/mpc
124131

125-
$SRCDIR/$MPC/configure --build=$BUILD \
126-
--host=$HOST_NATIVE \
132+
# for Raspberry Pi, let configure find the build and host settings
133+
$SRCDIR/$MPC/configure \
127134
--target=$TARGET \
128135
--prefix=$BUILDDIR_NATIVE/host-libs/usr \
129136
--disable-shared \
@@ -140,8 +147,8 @@ echo Task [I-4] /$HOST_NATIVE/isl/
140147
rm -rf $BUILDDIR_NATIVE/isl && mkdir -p $BUILDDIR_NATIVE/isl
141148
pushd $BUILDDIR_NATIVE/isl
142149

143-
$SRCDIR/$ISL/configure --build=$BUILD \
144-
--host=$HOST_NATIVE \
150+
# for Raspberry Pi, let configure find the build and host settings
151+
$SRCDIR/$ISL/configure \
145152
--target=$TARGET \
146153
--prefix=$BUILDDIR_NATIVE/host-libs/usr \
147154
--disable-shared \
@@ -157,8 +164,8 @@ echo Task [I-5] /$HOST_NATIVE/cloog/
157164
rm -rf $BUILDDIR_NATIVE/cloog && mkdir -p $BUILDDIR_NATIVE/cloog
158165
pushd $BUILDDIR_NATIVE/cloog
159166

160-
$SRCDIR/$CLOOG/configure --build=$BUILD \
161-
--host=$HOST_NATIVE \
167+
# for Raspberry Pi, let configure find the build and host settings
168+
$SRCDIR/$CLOOG/configure \
162169
--target=$TARGET \
163170
--prefix=$BUILDDIR_NATIVE/host-libs/usr \
164171
--disable-shared \
@@ -177,8 +184,8 @@ echo Task [I-6] /$HOST_NATIVE/libelf/
177184
rm -rf $BUILDDIR_NATIVE/libelf && mkdir -p $BUILDDIR_NATIVE/libelf
178185
pushd $BUILDDIR_NATIVE/libelf
179186

180-
$SRCDIR/$LIBELF/configure --build=$BUILD \
181-
--host=$HOST_NATIVE \
187+
# for Raspberry Pi, let configure find the build and host settings
188+
$SRCDIR/$LIBELF/configure \
182189
--target=$TARGET \
183190
--prefix=$BUILDDIR_NATIVE/host-libs/usr \
184191
--disable-shared \
@@ -193,8 +200,8 @@ echo Task [I-7] /$HOST_NATIVE/expat/
193200
rm -rf $BUILDDIR_NATIVE/expat && mkdir -p $BUILDDIR_NATIVE/expat
194201
pushd $BUILDDIR_NATIVE/expat
195202

196-
$SRCDIR/$EXPAT/configure --build=$BUILD \
197-
--host=$HOST_NATIVE \
203+
# for Raspberry Pi, let configure find the build and host settings
204+
$SRCDIR/$EXPAT/configure \
198205
--target=$TARGET \
199206
--prefix=$BUILDDIR_NATIVE/host-libs/usr \
200207
--disable-shared \
@@ -204,6 +211,11 @@ make -j$JOBS
204211
make install
205212
popd
206213

214+
215+
# for Raspberry Pi, always skip mingw32
216+
exit 0
217+
218+
207219
# skip building mingw32 toolchain if "--skip_mingw32" specified
208220
if [ "x$skip_mingw32" == "xyes" ] ; then
209221
exit 0

build-toolchain.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ fi
5151
skip_mingw32=no
5252
DEBUG_BUILD_OPTIONS=
5353
is_ppa_release=no
54-
skip_manual=no
54+
skip_manual=yes
5555
MULTILIB_LIST="--with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r"
5656
for ac_arg; do
5757
case $ac_arg in
@@ -84,8 +84,8 @@ if [ "x$is_ppa_release" != "xyes" ]; then
8484
ENV_LDFLAGS=" -L$BUILDDIR_NATIVE/host-libs/zlib/lib
8585
-L$BUILDDIR_NATIVE/host-libs/usr/lib "
8686

87-
GCC_CONFIG_OPTS=" --build=$BUILD --host=$HOST_NATIVE
88-
--with-gmp=$BUILDDIR_NATIVE/host-libs/usr
87+
# for Raspberry Pi, let configure find the build and host settings
88+
GCC_CONFIG_OPTS=" --with-gmp=$BUILDDIR_NATIVE/host-libs/usr
8989
--with-mpfr=$BUILDDIR_NATIVE/host-libs/usr
9090
--with-mpc=$BUILDDIR_NATIVE/host-libs/usr
9191
--with-isl=$BUILDDIR_NATIVE/host-libs/usr

0 commit comments

Comments
 (0)