File tree Expand file tree Collapse file tree 6 files changed +230
-2
lines changed Expand file tree Collapse file tree 6 files changed +230
-2
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,24 @@ jobs:
17
17
- 2.5.7
18
18
- 2.5.7-psx
19
19
- 2.6.0
20
+ - 2.6.0-psx
20
21
- 2.6.3
21
22
- 2.6.3-psx
22
23
- 2.7.0
23
24
- 2.7.1
24
25
- 2.7.2
26
+ - 2.7.2-psx
25
27
- 2.7.2.1
26
28
- 2.7.2.2
27
29
- 2.7.2.3
28
30
- 2.8.0
31
+ - 2.8.0-psx
29
32
- 2.8.1
30
33
- 2.8.1-psx
31
34
- 2.91.66
35
+ - 2.91.66-psx
32
36
- 2.95.2
37
+ - 2.95.2-psx
33
38
name : Build GCC ${{ matrix.version }}
34
39
steps :
35
40
- name : Clone repository
@@ -42,12 +47,12 @@ jobs:
42
47
cd build-gcc-${{ matrix.version }}
43
48
tar -czvf ../gcc-${{ matrix.version }}.tar.gz *
44
49
- name : Create artifact
45
- uses : actions/upload-artifact@v3
50
+ uses : actions/upload-artifact@v4
46
51
with :
47
52
name : gcc-${{ matrix.version }}
48
53
path : gcc-${{ matrix.version }}.tar.gz
49
54
- name : Publish release
50
- uses : softprops/action-gh-release@v1
55
+ uses : softprops/action-gh-release@v2
51
56
if : startsWith(github.ref, 'refs/tags/')
52
57
with :
53
58
files : |
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
+ WORKDIR /work
7
+ RUN wget http://www.nic.funet.fi/index/gnu/funet/historical-funet-gnu-area-from-early-1990s/gcc-2.6.0.tar.gz
8
+ RUN tar xzf gcc-2.6.0.tar.gz
9
+
10
+ WORKDIR /work/gcc-2.6.0
11
+ COPY patches /work/patches
12
+ RUN sed -i -- 's/include <varargs.h>/include <stdarg.h>/g' *.c
13
+
14
+ RUN patch -u -p1 obstack.h -i ../patches/obstack-2.7.2.h.patch
15
+ RUN patch -u -p1 sdbout.c -i ../patches/sdbout-2.6.0.c.patch
16
+ RUN patch -u -p1 collect2.c -i ../patches/collect2-2.6.0.c.patch
17
+ RUN patch -u -p1 cccp.c -i ../patches/cccp-2.6.0.c.patch
18
+ RUN patch -u -p1 gcc.c -i ../patches/gcc-2.6.0.c.patch
19
+ RUN patch -u -p1 cp/g++.c -i ../patches/g++-2.6.0.c.patch
20
+ RUN patch -u -p1 config/mips/mips.h -i ../patches/mipsel-2.6.patch
21
+ RUN patch -su -p1 < ../patches/psx.patch
22
+
23
+ RUN ./configure \
24
+ --target=mips-linux-gnu \
25
+ --prefix=/opt/cross \
26
+ --with-endian-little \
27
+ --with-gnu-as \
28
+ --host=i386-pc-linux \
29
+ --build=i386-pc-linux
30
+
31
+ RUN make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static -Dbsd4_4 -Dmips -DHAVE_STRERROR"
32
+
33
+ COPY tests /work/tests
34
+ RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$ 2,0\(\$ 4\) ' /work/tests/little_endian.s
35
+ RUN ./cc1 -quiet -O2 /work/tests/section_attribute.c
36
+
37
+ RUN mv xgcc gcc
38
+ RUN mkdir /build && cp cpp cc1 gcc cc1plus g++ /build/
39
+
40
+ FROM scratch AS export
41
+ COPY --from=build /build/* .
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.7.2
7
+ ENV GNUPATH=old-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.7.2.h.patch
19
+ RUN patch -u -p1 configure -i ../patches/configure.patch
20
+ RUN patch -u -p1 config.sub -i ../patches/config.sub.patch
21
+ RUN patch -u -p1 config/mips/mips.h -i ../patches/mipsel-2.7.patch
22
+ RUN patch -su -p1 < ../patches/psx.patch
23
+
24
+ RUN ./configure \
25
+ --target=mips-sony-psx \
26
+ --prefix=/opt/cross \
27
+ --with-endian-little \
28
+ --with-gnu-as \
29
+ --disable-gprof \
30
+ --disable-gdb \
31
+ --disable-werror \
32
+ --host=i386-pc-linux \
33
+ --build=i386-pc-linux
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/* .
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.0
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.0.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-linux-gnu \
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 make --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static"
34
+
35
+ COPY tests /work/tests
36
+ RUN ./cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$ 2,0\(\$ 4\) ' /work/tests/little_endian.s
37
+ RUN ./cc1 -quiet -O2 /work/tests/section_attribute.c
38
+
39
+ RUN mv xgcc gcc
40
+ RUN mkdir /build && cp cpp cc1 gcc cc1plus g++ /build/
41
+
42
+ FROM scratch AS export
43
+ COPY --from=build /build/* .
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.91.66
7
+
8
+ WORKDIR /work
9
+ RUN wget https://gcc.gnu.org/pub/gcc/old-releases/egcs/egcs-1.1.2.tar.bz2
10
+ RUN mkdir -p /work/gcc-${VERSION}/
11
+ RUN tar xjf egcs-1.1.2.tar.bz2 --strip-components=1 -C gcc-${VERSION}
12
+
13
+ WORKDIR /work/gcc-${VERSION}/
14
+
15
+ COPY patches /work/patches
16
+
17
+ RUN sed -i -- 's/include <varargs.h>/include <stdarg.h>/g' **/*.c
18
+ RUN patch -u -p1 gcc/obstack.h -i ../patches/obstack-${VERSION}.h.patch
19
+ RUN patch -u -p1 gcc/config/mips/mips.h -i ../patches/mipsel-2.8.patch
20
+ RUN patch -su -p1 < ../patches/psx.patch
21
+
22
+ RUN for dir in libiberty gcc; do \
23
+ cd /work/gcc-${VERSION}/${dir}; \
24
+ ./configure \
25
+ --target=mips-linux-gnu \
26
+ --prefix=/opt/cross \
27
+ --with-endian-little \
28
+ --with-gnu-as \
29
+ --disable-gprof \
30
+ --disable-gdb \
31
+ --disable-werror \
32
+ --host=i386-pc-linux \
33
+ --build=i386-pc-linux; \
34
+ done
35
+
36
+ RUN make -C libiberty/ CFLAGS="-std=gnu89 -m32 -static"
37
+ RUN make -C gcc/ --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static"
38
+
39
+ COPY tests /work/tests
40
+ RUN ./gcc/cc1 -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$ 2,0\(\$ 4\) ' /work/tests/little_endian.s
41
+ RUN ./gcc/cc1 -quiet -O2 /work/tests/section_attribute.c
42
+
43
+ RUN mv ./gcc/xgcc ./gcc/gcc
44
+ RUN mkdir /build && cp ./gcc/cpp ./gcc/cc1 ./gcc/gcc ./gcc/cc1plus ./gcc/g++ /build/
45
+
46
+ FROM scratch AS export
47
+ COPY --from=build /build/* .
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.95.2
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
+
17
+ RUN sed -i -- 's/include <varargs.h>/include <stdarg.h>/g' **/*.c
18
+ RUN patch -u -p1 include/obstack.h -i ../patches/obstack-${VERSION}.h.patch
19
+ RUN patch -u -p1 gcc/config/mips/mips.h -i ../patches/mipsel-2.8.patch
20
+ RUN patch -su -p1 < ../patches/psx.patch
21
+
22
+ RUN for dir in libiberty gcc; do \
23
+ cd /work/gcc-${VERSION}/${dir}; \
24
+ ./configure \
25
+ --target=mips-linux-gnu \
26
+ --prefix=/opt/cross \
27
+ --with-endian-little \
28
+ --with-gnu-as \
29
+ --disable-gprof \
30
+ --disable-gdb \
31
+ --disable-werror \
32
+ --host=i386-pc-linux \
33
+ --build=i386-pc-linux; \
34
+ done
35
+
36
+ RUN make -C libiberty/ CFLAGS="-std=gnu89 -m32 -static"
37
+ RUN make -C gcc/ --jobs $(nproc) cpp cc1 xgcc cc1plus g++ CFLAGS="-std=gnu89 -m32 -static"
38
+
39
+ COPY tests /work/tests
40
+ RUN ./gcc/cc1 -mel -quiet -O2 /work/tests/little_endian.c && grep -E 'lbu\s\$ 2,0\(\$ 4\) ' /work/tests/little_endian.s
41
+ RUN ./gcc/cc1 -quiet -O2 /work/tests/section_attribute.c
42
+
43
+ RUN mv ./gcc/xgcc ./gcc/gcc
44
+ RUN mkdir /build && cp ./gcc/cpp ./gcc/cc1 ./gcc/gcc ./gcc/cc1plus ./gcc/g++ /build/
45
+
46
+ FROM scratch AS export
47
+ COPY --from=build /build/* .
You can’t perform that action at this time.
0 commit comments