File tree Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Expand file tree Collapse file tree 2 files changed +46
-0
lines changed Original file line number Diff line number Diff line change 27
27
- 2.7.2.3
28
28
- 2.8.0
29
29
- 2.8.1
30
+ - 2.8.1-psx
30
31
- 2.91.66
31
32
- 2.95.2
32
33
name : Build GCC ${{ matrix.version }}
Original file line number Diff line number Diff line change
1
+ FROM ubuntu:focal as build
2
+ ENV DEBIAN_FRONTEND=noninteractive
3
+ RUN apt-get update
4
+ RUN apt-get install -y build-essential gcc gcc-multilib wget
5
+
6
+ ENV VERSION=2.8.1
7
+ ENV GNUPATH=gnu
8
+
9
+ WORKDIR /work
10
+ RUN wget https://ftp.gnu.org/${GNUPATH}/gcc/gcc-${VERSION}.tar.gz
11
+ RUN tar xzf gcc-${VERSION}.tar.gz
12
+
13
+ WORKDIR /work/gcc-${VERSION}
14
+
15
+ COPY patches /work/patches
16
+ RUN sed -i -- 's/include <varargs.h>/include <stdarg.h>/g' *.c
17
+
18
+ RUN patch -u -p1 obstack.h -i ../patches/obstack-2.8.1.h.patch
19
+ RUN patch -u -p1 config/mips/mips.h -i ../patches/mipsel-2.8.patch
20
+ RUN patch -su -p1 < ../patches/psx.patch
21
+
22
+ RUN ./configure \
23
+ --target=mips-sony-psx \
24
+ --prefix=/opt/cross \
25
+ --with-endian-little \
26
+ --with-gnu-as \
27
+ --disable-gprof \
28
+ --disable-gdb \
29
+ --disable-werror \
30
+ --host=i386-pc-linux \
31
+ --build=i386-pc-linux
32
+
33
+ RUN touch insn-config.h
34
+
35
+ RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static"
36
+
37
+ COPY tests /work/tests
38
+ RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$ 2,0\(\$ 4\) ' /work/tests/little_endian.s
39
+ RUN ./cc1 -quiet -O2 /work/tests/section_attribute.c
40
+
41
+ RUN mv xgcc gcc
42
+ RUN mkdir /build && cp cpp cc1 gcc cc1plus g++ /build/
43
+
44
+ FROM scratch AS export
45
+ COPY --from=build /build/* .
You can’t perform that action at this time.
0 commit comments