From 882e3eaceb87a42abd0119a81cd3b86815d63e78 Mon Sep 17 00:00:00 2001 From: Yann MAGNIN Date: Sat, 14 May 2022 11:07:16 +0200 Subject: [PATCH] sh-elf-vhex - v1.0.3 : vxSDK update @update > Makefile: rename giteapc.make (broke the giteapc compatibility) > script/gcc/build : use Vhex's OpenLibm fork instead of Lephenixnoir's fork > vxsdk.toml : | section title | project version | project compilation step @fix > script/binutils/install : symbolic link > script/gcc/install : symbolic link > script/gcc/build : | force the PIC compilation for the OpenLibm lib | force the PIC compilation for the fxlibc lib | clone only the last commit for the fxlibc lib --- .gitignore | 1 + giteapc.make => Makefile | 8 ++------ compile.sh | 1 + scripts/binutils/install.sh | 6 +++--- scripts/gcc/build.sh | 10 +++++----- scripts/gcc/install.sh | 6 +++--- vxsdk.toml | 12 ++++++------ 7 files changed, 21 insertions(+), 23 deletions(-) rename giteapc.make => Makefile (80%) diff --git a/.gitignore b/.gitignore index ab307b2..e16282a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ build cache +commit.txt diff --git a/giteapc.make b/Makefile similarity index 80% rename from giteapc.make rename to Makefile index ad0f804..351694a 100644 --- a/giteapc.make +++ b/Makefile @@ -1,10 +1,6 @@ -# giteapc: version=1 -PREFIX ?= $(GITEAPC_PREFIX) -VERSION_BINUTILS := 2.37 -VERSION_GCC := 11.2.0 - --include giteapc-config.make +VERSION_BINUTILS := 2.37 +VERSION_GCC := 11.2.0 configure: @ cd ./scripts/binutils \ diff --git a/compile.sh b/compile.sh index 8e679b9..f3039da 100755 --- a/compile.sh +++ b/compile.sh @@ -6,6 +6,7 @@ if [[ $# -eq 0 ]]; then exit 1 fi + cd scripts/binutils ./configure.sh --version=2.37 && ./build.sh && ./install.sh --prefix="$1" diff --git a/scripts/binutils/install.sh b/scripts/binutils/install.sh index 81a78b4..d86ddc3 100755 --- a/scripts/binutils/install.sh +++ b/scripts/binutils/install.sh @@ -58,13 +58,13 @@ if [[ ! -f "$existing_as" ]]; then echo " the 'as' tool is missing..." >&2 exit 1 fi -cd ../../build/binutils +cd ../../build/binutils/bin # Symbolic link executables to $PREFIX/bin echo "$TAG Symlinking binaries..." -mkdir -p $PREFIX/bin -for x in bin/*; do +mkdir -p $PREFIX +for x in *; do ln -sf "$(pwd)/$x" "$PREFIX/$x" done diff --git a/scripts/gcc/build.sh b/scripts/gcc/build.sh index c3bbb59..2a8e5dc 100755 --- a/scripts/gcc/build.sh +++ b/scripts/gcc/build.sh @@ -134,7 +134,7 @@ echo "$TAG Building Vhex's custom C standard library..." # Install OpenLibM rm -rf OpenLibm -$quiet git clone https://gitea.planet-casio.com/Lephenixnoir/OpenLibm.git --depth=1 +$quiet git clone https://gitea.planet-casio.com/Vhex-Kernel-Core/OpenLibm.git --depth=1 cd OpenLibm # Get installation path @@ -143,13 +143,13 @@ LIP=$(sh-elf-vhex-gcc --print-search-dirs | grep install | sed 's/install: //') # Build -$quiet $make_cmd USEGCC=1 ARCH=sh3eb TOOLPREFIX=sh-elf-vhex- \ +$quiet $make_cmd USEGCC=1 FORCE_PIC=1 ARCH=sh3eb TOOLPREFIX=sh-elf-vhex- \ CC=sh-elf-vhex-gcc AR=sh-elf-vhex-ar \ libdir="$LIP" includedir="$LIP/include" # Install (needed by fxlibc) -$quiet $make_cmd USEGCC=1 ARCH=sh3eb TOOLPREFIX=sh-elf-vhex- \ +$quiet $make_cmd USEGCC=1 FORCE_PIC=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 @@ -159,10 +159,10 @@ cd .. # Build Vhex custom C standard library rm -rf fxlibc -$quiet git clone https://gitea.planet-casio.com/Vhex-Kernel-Core/fxlibc.git --branch dev +$quiet git clone https://gitea.planet-casio.com/Vhex-Kernel-Core/fxlibc.git --branch dev --depth=1 cd fxlibc -$quiet cmake -DFXLIBC_TARGET=vhex-sh -B build-vhex \ +$quiet cmake -DFXLIBC_PIC=1 -DFXLIBC_TARGET=vhex-sh -B build-vhex \ -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-vhex.cmake \ -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_INSTALL_PREFIX="$LIP" diff --git a/scripts/gcc/install.sh b/scripts/gcc/install.sh index 1f1c68b..0c57509 100755 --- a/scripts/gcc/install.sh +++ b/scripts/gcc/install.sh @@ -58,13 +58,13 @@ if [[ ! -f "$existing_gcc" ]]; then echo " the tool is missing..." >&2 exit 1 fi -cd ../../build/gcc +cd ../../build/gcc/bin # Symbolic link executables to $PREFIX/bin echo "$TAG Symlinking binaries..." -mkdir -p $PREFIX/bin -for x in bin/*; do +mkdir -p $PREFIX +for x in *; do ln -sf "$(pwd)/$x" "$PREFIX/$x" done diff --git a/vxsdk.toml b/vxsdk.toml index a3140e3..97ed944 100644 --- a/vxsdk.toml +++ b/vxsdk.toml @@ -1,10 +1,10 @@ -[package] +[project] name = 'sh-elf-vhex' -version = '1.0.1' +version = '1.0.3' type = 'app' [build] -configure = 'make -f giteapc.make configure' -build = 'make -f giteapc.make build' -install = 'PREFIX=$VXSDK_INSTALL_PREFIX make -f giteapc.make install' -uninstall = 'PREFIX=$VXSDK_INSTALL_PREFIX make -f giteapc.make uninstall' +configure = 'make configure' +build = 'make build' +install = 'PREFIX=$VXSDK_PREFIX_INSTALL make install' +uninstall = 'PREFIX=$VXSDK_PREFIX_INSTALL make uninstall'