diff --git a/.gitignore b/.gitignore index e873da7..30e9317 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ gcc-*/ sysroot/ fxlibc OpenLibm +libfxcg/ +test diff --git a/README.md b/README.md index b464e4c..550ac3d 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ make -j$(nproc) all-gcc all-target-libgcc make install-strip-gcc install-strip-target-libgcc # TODO: may need to add Ada stuff? ``` -We now have successfully corss compiled gcc. However we still need to add a libc and compile gnat. +We now have successfully cross compiled gcc. However we still need to add a libc and compile gnat. For that we will have to install the required headers into the correct coresponding direcotry ```bash @@ -142,16 +142,6 @@ make -C gcc cross-gnattools make install-strip ``` -Now we install the actual libc - -```bash -# git clone https://git.planet-casio.com/Vhex-Kernel-Core/fxlibc.git -# cd fxlibc -# cmake -B build-gint -DFXLIBC_TARGET=gint -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain-sh.cmake -DCMAKE_INSTALL_PREFIX="$PREFIX" #instead of Sysroot use lib/gcc/15.2.0 -# make -C build-casiowin-cg #casiowin-cg does not work? using gint instead -# make -C build-casiowin-cg install -``` - > [!NOTE] > There is also gint and vhex form the repo but those target also other calculators that I don't have access to. > For my own sanity sake I'll just stick with the casiowin-cg @@ -180,7 +170,6 @@ make make install/local ``` - ## Adding our custom compiler to GPRBuild TODO: look into ironclad gprbuild integration diff --git a/build-gcc.sh b/build-gcc.sh index e9f7416..01fe553 100755 --- a/build-gcc.sh +++ b/build-gcc.sh @@ -2,7 +2,7 @@ set -e -# Step 1. Download GCC and binutils source code +# Definitions ADACASIO_BINUTILS_VERSION="2.46.0" ADACASIO_GCC_VERSION="15.2.0" ADACASIO_BINUTILS_URL="https://ftp.gnu.org/gnu/binutils/binutils-$ADACASIO_BINUTILS_VERSION.tar.gz" @@ -10,6 +10,13 @@ ADACASIO_GCC_URL="https://ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-$ADACASIO_GCC_VERSI ADACASIO_PREFIX="$(pwd)/sysroot" ADACASIO_TARGET="sh-elf" +# Install dependencies +# For now I have only tested Fedora 43. YMMV +sudo -i +dnf install mg +dnf upgrade +dnf install @c-development gnat gprbuild gmp-devel mpfr-devel libmpc-devel git + # prepare configure and build enviornment wget -O binutils.tar.gz $ADACASIO_BINUTILS_URL wget -O gcc.tar.gz $ADACASIO_GCC_URL diff --git a/libfxcg b/libfxcg new file mode 160000 index 0000000..daa76d9 --- /dev/null +++ b/libfxcg @@ -0,0 +1 @@ +Subproject commit daa76d9e37758ab5b9b0f614b7e0aa6acfbe2e18 diff --git a/test/program.adb b/test/program.adb new file mode 100644 index 0000000..fb3d8e6 --- /dev/null +++ b/test/program.adb @@ -0,0 +1,6 @@ +package body Program is + procedure Main is + begin + null; + end Main; +end Program; diff --git a/test/program.ads b/test/program.ads new file mode 100644 index 0000000..621326f --- /dev/null +++ b/test/program.ads @@ -0,0 +1,4 @@ +package Program is + procedure Main; + pragma Export (C, Main, "main"); +end Program;