From 3503d79cae0f4d3f993365626c6b2c60b406b497 Mon Sep 17 00:00:00 2001 From: Yann MAGNIN Date: Sun, 14 Nov 2021 13:30:15 +0100 Subject: [PATCH] fix build for Fedora --- scripts/binutils/configure.sh | 8 +++++++- scripts/gcc/build.sh | 8 ++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/scripts/binutils/configure.sh b/scripts/binutils/configure.sh index 1c8f69e..1f33ec3 100755 --- a/scripts/binutils/configure.sh +++ b/scripts/binutils/configure.sh @@ -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 diff --git a/scripts/gcc/build.sh b/scripts/gcc/build.sh index 8fc0660..8a1fa89 100755 --- a/scripts/gcc/build.sh +++ b/scripts/gcc/build.sh @@ -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