fix build for Fedora

This commit is contained in:
Yann MAGNIN 2021-11-14 13:30:15 +01:00
parent 1bdbc420fa
commit 3503d79cae
2 changed files with 9 additions and 7 deletions

View File

@ -107,6 +107,12 @@ elif command -v apt >/dev/null 2>&1; then
pm=apt
pm_has="dpkg -s"
pm_install="sudo apt install"
elif command -v dnf >/dev/null 2>&1; then
deps="mpfr-devel libmpc-devel gmp-devel libpng-devel ppl-devel flex gcc git texinfo xz"
pm=dnf
pm_has="echo '$(rpm -qa)' | grep -i "
pm_install="sudo dnf install"
fix='-'
elif command -v pacman >/dev/null 2>&1; then
deps="mpfr libmpc gmp libpng ppl flex gcc git texinfo xz"
pm=pacman
@ -119,7 +125,7 @@ fi
missing=""
if [[ -z "$trust_deps" ]]; then
for d in $deps; do
if ! $pm_has $d >/dev/null 2>&1; then
if ! bash -c "$pm_has $d$fix" >/dev/null 2>&1; then
missing="$missing $d"
fi
done

View File

@ -2,8 +2,6 @@
verbose=false
read -n 1 -p 'wait user key....' _test
#
# Help screen
#
@ -159,9 +157,9 @@ cd ..
echo "$TAG Patch the standard library..."
rm -rf fxlibc
git clone https://gitea.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
$quiet git clone https://gitea.planet-casio.com/Vhex-Kernel-Core/fxlibc.git
cd fxlibc
git checkout dev
$quiet git checkout dev
$quiet cmake -DFXLIBC_TARGET=vhex-sh -B build-vhex \
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-vhex.cmake \
@ -208,14 +206,12 @@ $quiet $make_cmd -j"$cores" install-strip-gcc
echo "$TAG Install C standar library..."
cd ../../OpenLibm
echo " - OpenLibm"
$quiet $make_cmd USEGCC=1 ARCH=sh3eb TOOLPREFIX=sh-elf-vhex- \
CC=sh-elf-vhex-gcc AR=sh-elf-vhex-ar \
libdir="$LIP" includedir="$LIP/include" \
install-static install-headers
cd ../fxlibc/build-vhex
echo " - FxLibC"
$quiet $make_cmd install