Skip to content
Snippets Groups Projects
Commit d877222c authored by Kenneth Ryan Hancock's avatar Kenneth Ryan Hancock
Browse files

Merge branch 'master' into 'master'

Support Apple Silicon and aarch64 Linux

See merge request krhancoc/cs350-container!3
parents 142e93bd 415676d3
Branches master
No related tags found
No related merge requests found
......@@ -143,9 +143,3 @@ If the assignments repo has changed, either due to assignments being changed or
This is due to windows placing return characters in the strings that get
passed to the scripts. Please use git bash or a terminal that does UNIX
string passing.
**Cannot figure out the host**
This occurs within newer level Macs that use Apple Silicon, docker
currently requires x86 architectures to work, you'll need to use the
student environment.
......@@ -10,12 +10,16 @@ RUN mkdir -p /os161/tools/bin; \
mkdir -p /os161/tools/share/man/man1; \
mkdir -p /os161/tools/share/mk;
# Install a newer version of config.guess with ARM support. Pin it to a specific commit for stability.
ADD https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=20403c5701973a4cbd7e0b4bbeb627fcd424a0f1 /tmp/config.guess
RUN chmod +x /tmp/config.guess
COPY dependencies/os161-binutils.tar.gz /binutils.tar.gz
RUN mkdir /binutils-src; \
tar -xf /binutils.tar.gz -C /binutils-src --strip-components 1
WORKDIR /binutils-src
RUN cp -f /tmp/config.guess .
RUN find . -name '*.info' | xargs touch; \
./configure --nfp --disable-werror --target=mips-harvard-os161 --prefix=/os161/tools; \
make -j 4 && make install; \
......@@ -30,6 +34,7 @@ RUN mkdir /gcc-src; \
tar -xf /gcc.tar.gz -C /gcc-src --strip-components 1
WORKDIR /gcc-src
RUN cp -f /tmp/config.guess .
RUN CFLAGS="-std=gnu89" ./configure -nfp --disable-shared --disable-threads \
--disable-libmudflap --disable-libssp --target=mips-harvard-os161 --prefix=/os161/tools; \
make -j 4 && make install; \
......@@ -65,12 +70,14 @@ COPY dependencies/os161-gdb.tar.gz /os161-gdb.tar.gz
RUN mkdir /os161-gdb/ && tar -xf /os161-gdb.tar.gz -C /os161-gdb --strip-components 1
WORKDIR /os161-gdb
RUN cp -f /tmp/config.guess .
RUN CFLAGS="-std=gnu89" ./configure --target=mips-harvard-os161 --prefix=/os161/tools --disable-werror && \
make && make install
WORKDIR /
RUN rm -rf /os161-gdb /os161-gdb.tar.gz
RUN rm -f /tmp/config.guess
RUN cd /os161/tools/bin && sh -c 'for i in mips-*; do ln -s /os161/tools/bin/$i /os161/tools/bin/cs350-`echo $i | cut -d- -f4-`; done'
RUN python3 -m pip install -U prettytable
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment