lfs-buildscripts/CH8Build/CH08.49-libffi.sh

46 lines
765 B
Bash
Raw Permalink Normal View History

2024-10-06 17:01:29 +08:00
#!/bin/bash
# See https://gcc.gnu.org/onlinedocs/gcc-14.2.0/gcc/x86-Options.html
# for gcc-arch
source versions.sh
GLSOURCES="/sources"
2024-10-09 09:50:04 +08:00
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
2024-10-06 17:01:29 +08:00
[ -d libffi-${libffi_version} ] && rm -rf libffi-${libffi_version}
tar -zxf ${libffi_tarball}
cd libffi-${libffi_version}
./configure --prefix=/usr \
--disable-static \
--with-gcc-arch=native
make
if [ $? -ne 0 ]; then
myfail "Failed building libffi"
fi
2024-10-09 09:50:04 +08:00
if [ ! -f ${GLSOURCES}/SKIPTESTS ]; then
echo "running libffi make check"
make check > ${GLSOURCES}/libffi.check.log 2>&1
fi
2024-10-06 17:01:29 +08:00
make install
if [ $? -ne 0 ]; then
myfail "Failed installing libffi"
fi
2024-10-08 14:25:15 +08:00
popd
# cleanup
pushd $GLSOURCES
rm -rf libffi-${libffi_version}
popd