linux stuff
This commit is contained in:
parent
39ab3007fc
commit
c274a6254c
@ -10,11 +10,11 @@ do
|
|||||||
docker create --name ${container_name} ${image_name} || exit
|
docker create --name ${container_name} ${image_name} || exit
|
||||||
|
|
||||||
mkdir --parent build || 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
|
docker container rm ${container_name} || exit
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ $EUID == 0 ]]; then
|
if [[ $EUID == 0 ]]; then
|
||||||
chown --recursive ${USER} build
|
chown --recursive ${USER} gcc-mostlyportable-*
|
||||||
fi
|
fi
|
||||||
|
@ -27,6 +27,7 @@ WORKDIR /usr/local/docker
|
|||||||
ARG MOSTLY_PORTABLE_GCC_GIT_BRANCH=master
|
ARG MOSTLY_PORTABLE_GCC_GIT_BRANCH=master
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& git clone https://github.com/Frogging-Family/mostlyportable-gcc \
|
&& git clone https://github.com/Frogging-Family/mostlyportable-gcc \
|
||||||
|
&& cd mostlyportable-gcc \
|
||||||
&& git checkout $MOSTLY_PORTABLE_GIT_BRANCH
|
&& git checkout $MOSTLY_PORTABLE_GIT_BRANCH
|
||||||
|
|
||||||
ARG GCC_VERSION=11.3.0
|
ARG GCC_VERSION=11.3.0
|
||||||
|
@ -53,6 +53,11 @@ mkdir --parents ${bin_dir}
|
|||||||
|
|
||||||
# Tools
|
# 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
|
# CMake
|
||||||
# ----------------------------------------------------------------------------
|
# ----------------------------------------------------------------------------
|
||||||
@ -112,15 +117,15 @@ cp "${installer_dir}/unix_gcc_dockerfile" "${gcc_dir}/Dockerfile"
|
|||||||
|
|
||||||
cd "${gcc_dir}" || exit
|
cd "${gcc_dir}" || exit
|
||||||
for gcc_version in ${gcc_version_list[@]}; do
|
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
|
if [[ ! -f "${gcc_bin_dir}/g++" ]]; then
|
||||||
./build.sh ${gcc_version} || exit
|
./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
|
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
|
done
|
||||||
ln -s ${gcc_bin_dir}/g++ ${bin_dir}/g++ || exit
|
ln --symbolic --force --relative "${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}/gcc" "${bin_dir}/gcc" || exit
|
||||||
cd "${root_dir}" || exit
|
cd "${root_dir}" || exit
|
||||||
|
|
||||||
# LLVM/Clang
|
# LLVM/Clang
|
||||||
|
Loading…
Reference in New Issue
Block a user