Improve podman build

This commit is contained in:
jaby 2025-01-03 10:16:57 +01:00
parent 80a49a7e92
commit df3b5cd334
2 changed files with 8 additions and 9 deletions

View File

@ -1,6 +1,7 @@
FROM "ubuntu:24.04" FROM "ubuntu:24.04"
WORKDIR /usr WORKDIR /usr/scripts
ADD ["scripts/make_gcc.sh", "/usr/scripts"] ADD ["scripts/make_gcc.sh", "/usr/scripts"]
WORKDIR /usr
RUN apt update && /usr/scripts/make_gcc.sh RUN apt update && /usr/scripts/make_gcc.sh
WORKDIR /usr/scripts WORKDIR /usr/scripts

View File

@ -21,12 +21,12 @@ if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
echo "<<< Make binutils >>>" echo "<<< Make binutils >>>"
make make -j$(nproc)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
echo "<<< Install binutils >>>" echo "<<< Install binutils >>>"
make install make -j$(nproc) install
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
@ -38,7 +38,7 @@ git clone --recurse-submodules git://gcc.gnu.org/git/gcc.git
cd gcc cd gcc
echo "<<< checkout gcc $GCC_VERSION >>>" echo "<<< checkout gcc $GCC_VERSION >>>"
git checkout releases/$GCC_VERSION git checkout "releases/gcc-$GCC_VERSION"
mkdir -p build mkdir -p build
cd build cd build
@ -49,19 +49,17 @@ if [ $? -ne 0 ]; then
fi fi
echo "<<< Make gcc >>>" echo "<<< Make gcc >>>"
make all-gcc make -j$(nproc) all-gcc
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
echo "<<< Install gcc >>>" echo "<<< Install gcc >>>"
make install-gcc make -j$(nproc) install-gcc
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
exit 1 exit 1
fi fi
echo "<<< Delete GCC folder >>>" echo "<<< Delete GCC folder >>>"
cd /usr cd /usr
rm -fr psx-gcc rm -fr psx-gcc
# TODO: Remove gcc files after everything