|
|
@ -3,8 +3,8 @@ FROM alpine |
|
|
|
|
|
|
|
# set up environment variables for the compiler |
|
|
|
ENV TARGET="sh3eb-elf" \ |
|
|
|
COMPILER="/opt/sh-elf-2.31.1-8.2.0" \ |
|
|
|
PATH="$PATH:/opt/sh-elf-2.31.1-8.2.0/bin" |
|
|
|
COMPILER="/opt/sh-elf-2.35-10.2.0" \ |
|
|
|
PATH="$PATH:/opt/sh-elf-2.35-10.2.0/bin" |
|
|
|
|
|
|
|
# dependencies |
|
|
|
RUN apk update && apk add --update --no-cache \ |
|
|
@ -21,21 +21,21 @@ RUN apk update && apk add --update --no-cache \ |
|
|
|
flex |
|
|
|
|
|
|
|
# extract archives (binutils & gcc) |
|
|
|
ADD binutils-2.31.1.tar.xz gcc-8.2.0.tar.xz $COMPILER/ |
|
|
|
ADD binutils-2.35.tar.xz gcc-10.2.0.tar.xz $COMPILER/ |
|
|
|
|
|
|
|
# binutils |
|
|
|
RUN cd $COMPILER && mkdir build-binutils && cd build-binutils && \ |
|
|
|
../binutils-2.31.1/configure --prefix=$COMPILER --target=$TARGET --with-multilib-list=m3,m4-nofpu --disable-nls --program-prefix=sh-elf- && \ |
|
|
|
../binutils-2.35/configure --prefix=$COMPILER --target=$TARGET --with-multilib-list=m3,m4-nofpu --disable-nls --program-prefix=sh-elf- && \ |
|
|
|
make && make install |
|
|
|
|
|
|
|
# gcc |
|
|
|
RUN cd $COMPILER && mkdir build-gcc && cd build-gcc && \ |
|
|
|
../gcc-8.2.0/configure --prefix=$COMPILER --target=$TARGET --with-multilib-list=m3,m4-nofpu --enable-languages=c,c++ --without-headers --with-newlib --disable-nls --program-prefix=sh-elf- && \ |
|
|
|
../gcc-10.2.0/configure --prefix=$COMPILER --target=$TARGET --with-multilib-list=m3,m4-nofpu --enable-languages=c,c++ --without-headers --with-newlib --disable-nls --program-prefix=sh-elf- && \ |
|
|
|
make all-gcc && make install-gcc |
|
|
|
|
|
|
|
# link gcc with libgcc |
|
|
|
# need to fix the contrib/dl script : https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg549371.html |
|
|
|
RUN cd $COMPILER/gcc-8.2.0 && \ |
|
|
|
RUN cd $COMPILER/gcc-10.2.0 && \ |
|
|
|
sed -i 's/sha512sum --check/sha512sum -c/g' ./contrib/download_prerequisites && \ |
|
|
|
./contrib/download_prerequisites && \ |
|
|
|
cd $COMPILER/build-gcc && \ |
|
|
|