Fixes building for RPi using --no-undefined
parent
ec080ff892
commit
2f6198edb6
|
@ -62,6 +62,12 @@ edit $SYSROOT/etc/ld.so.preload and comment out all lines in it.
|
||||||
sudo umount $SYSROOT/proc
|
sudo umount $SYSROOT/proc
|
||||||
sudo umount $SYSROOT/sys
|
sudo umount $SYSROOT/sys
|
||||||
sudo umount /mnt
|
sudo umount /mnt
|
||||||
|
|
||||||
|
There's one more fix required, as the libdl.so symlink uses an absolute path
|
||||||
|
which doesn't quite work in our setup.
|
||||||
|
|
||||||
|
sudo rm -rf $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so
|
||||||
|
sudo ln -s ../../../lib/arm-linux-gnueabihf/libdl.so.2 $SYSROOT/usr/lib/arm-linux-gnueabihf/libdl.so
|
||||||
|
|
||||||
The final step is compiling SDL itself.
|
The final step is compiling SDL itself.
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,7 @@ mkdir -p $BUILDBOTDIR
|
||||||
pushd $BUILDBOTDIR
|
pushd $BUILDBOTDIR
|
||||||
|
|
||||||
SYSROOT="/opt/rpi-sysroot"
|
SYSROOT="/opt/rpi-sysroot"
|
||||||
export CC="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux"
|
export CC="/opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib"
|
||||||
# -L$SYSROOT/usr/lib/arm-linux-gnueabihf"
|
# -L$SYSROOT/usr/lib/arm-linux-gnueabihf"
|
||||||
# !!! FIXME: shouldn't have to --disable-* things here.
|
# !!! FIXME: shouldn't have to --disable-* things here.
|
||||||
../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd
|
../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd
|
||||||
|
|
|
@ -22102,11 +22102,10 @@ case "$host" in
|
||||||
# Raspberry Pi
|
# Raspberry Pi
|
||||||
ARCH=linux
|
ARCH=linux
|
||||||
RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
||||||
RPI_LDFLAGS="-L/opt/vc/lib -lbcm_host"
|
|
||||||
CFLAGS="$CFLAGS $RPI_CFLAGS"
|
CFLAGS="$CFLAGS $RPI_CFLAGS"
|
||||||
SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
|
SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
|
||||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
|
EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
|
||||||
SDL_LIBS="$SDL_LIBS $RPI_LDFLAGS"
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L/opt/vc/lib -lbcm_host -ldl"
|
||||||
|
|
||||||
if test x$enable_video = xyes; then
|
if test x$enable_video = xyes; then
|
||||||
SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
|
SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
|
||||||
|
|
|
@ -2384,11 +2384,10 @@ case "$host" in
|
||||||
# Raspberry Pi
|
# Raspberry Pi
|
||||||
ARCH=linux
|
ARCH=linux
|
||||||
RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
|
||||||
RPI_LDFLAGS="-L/opt/vc/lib -lbcm_host"
|
|
||||||
CFLAGS="$CFLAGS $RPI_CFLAGS"
|
CFLAGS="$CFLAGS $RPI_CFLAGS"
|
||||||
SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
|
SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
|
||||||
EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
|
EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
|
||||||
SDL_LIBS="$SDL_LIBS $RPI_LDFLAGS"
|
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -L/opt/vc/lib -lbcm_host -ldl"
|
||||||
|
|
||||||
if test x$enable_video = xyes; then
|
if test x$enable_video = xyes; then
|
||||||
SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
|
SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
|
||||||
|
|
Loading…
Reference in New Issue