linux stuff

This commit is contained in:
doyle 2022-07-19 15:40:33 +10:00
parent 39ab3007fc
commit c274a6254c
3 changed files with 13 additions and 7 deletions

View File

@ -10,11 +10,11 @@ do
docker create --name ${container_name} ${image_name} || exit
mkdir --parent build || exit
docker cp ${container_name}:/usr/local/docker/gcc-mostlyportable-${gcc_version} . || exit
docker cp ${container_name}:/usr/local/docker/mostlyportable-gcc/gcc-mostlyportable-${gcc_version} . || exit
docker container rm ${container_name} || exit
done
if [[ $EUID == 0 ]]; then
chown --recursive ${USER} build
chown --recursive ${USER} gcc-mostlyportable-*
fi

View File

@ -27,6 +27,7 @@ WORKDIR /usr/local/docker
ARG MOSTLY_PORTABLE_GCC_GIT_BRANCH=master
RUN set -ex \
&& git clone https://github.com/Frogging-Family/mostlyportable-gcc \
&& cd mostlyportable-gcc \
&& git checkout $MOSTLY_PORTABLE_GIT_BRANCH
ARG GCC_VERSION=11.3.0

View File

@ -53,6 +53,11 @@ mkdir --parents ${bin_dir}
# Tools
# ------------------------------------------------------------------------------
if ! command -v docker &> /dev/null
then
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
fi
# CMake
# ----------------------------------------------------------------------------
@ -112,15 +117,15 @@ cp "${installer_dir}/unix_gcc_dockerfile" "${gcc_dir}/Dockerfile"
cd "${gcc_dir}" || exit
for gcc_version in ${gcc_version_list[@]}; do
gcc_bin_dir=${gcc_dir}
gcc_bin_dir=${gcc_dir}/gcc-mostlyportable-${gcc_version}/bin
if [[ ! -f "${gcc_bin_dir}/g++" ]]; then
./build.sh ${gcc_version} || exit
ln -s ${gcc_bin_dir}/g++ ${bin_dir}/g++-${gcc_version} || exit
ln -s ${gcc_bin_dir}/gcc ${bin_dir}/gcc-${gcc_version} || exit
fi
ln --symbolic --force --relative ${gcc_bin_dir}/g++ ${bin_dir}/g++-${gcc_version} || exit
ln --symbolic --force --relative ${gcc_bin_dir}/gcc ${bin_dir}/gcc-${gcc_version} || exit
done
ln -s ${gcc_bin_dir}/g++ ${bin_dir}/g++ || exit
ln -s ${gcc_bin_dir}/gcc ${bin_dir}/gcc || exit
ln --symbolic --force --relative "${gcc_bin_dir}/g++" "${bin_dir}/g++" || exit
ln --symbolic --force --relative "${gcc_bin_dir}/gcc" "${bin_dir}/gcc" || exit
cd "${root_dir}" || exit
# LLVM/Clang