Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh binutils, add gcc 6.5.0b from Bebbo #8

Merged
merged 6 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
container: cahirwpz/demoscene-toolchain:latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand All @@ -24,7 +24,7 @@ jobs:
run: tar czf demoscene-toolchain.tar.gz /usr/local

- name: Upload toolchain
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: demoscene-toolchain
path: demoscene-toolchain.tar.gz
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,6 @@
[submodule "submodules/fs-uae"]
path = submodules/fs-uae
url = https://github.com/FrodeSolheim/fs-uae.git
[submodule "gcc-bebbo"]
path = submodules/gcc-bebbo
url = https://github.com/bebbo/gcc.git
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ RUN apt-get install -y --no-install-recommends \
automake bison ca-certificates flex git-core gettext gperf \
gcc g++ libc6-dev libglib2.0-dev libncurses-dev libpng-dev \
libsdl2-dev libsdl2-ttf-dev libopenal-dev libtool make patch \
pkg-config python3 python3-dev python3-pip quilt texinfo zip
pkg-config python3 python3-dev python3-venv quilt texinfo zip
COPY requirements.txt .
RUN python3 -m venv .venv
RUN source .venv/bin/activate && \
RUN . ./.venv/bin/activate && \
pip install --no-cache-dir -r requirements.txt
8 changes: 4 additions & 4 deletions patches/gdb-line-addr-fix.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ Index: demoscene-toolchain/submodules/binutils-gdb/gdb/dbxread.c
===================================================================
--- demoscene-toolchain.orig/submodules/binutils-gdb/gdb/dbxread.c
+++ demoscene-toolchain/submodules/binutils-gdb/gdb/dbxread.c
@@ -2581,7 +2581,7 @@ process_one_symbol (int type, int desc,

@@ -2622,7 +2622,7 @@ process_one_symbol (int type, int desc,
/* Relocate for dynamic loading and for ELF acc
function-relative symbols. */
function-relative symbols. */
#if (DEFAULT_BFD_VEC != amiga_vec)
- valu += function_start_offset;
+ /* valu += function_start_offset; */
#endif

/* GCC 2.95.3 emits the first N_SLINE stab somewhere in the
middle of the prologue instead of right at the start of the
4 changes: 2 additions & 2 deletions patches/ld-extra-chip-sections.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Index: demoscene-toolchain/submodules/binutils-gdb/bfd/amigaos.c
+++ demoscene-toolchain/submodules/binutils-gdb/bfd/amigaos.c
@@ -2825,9 +2825,15 @@ amiga_new_section_hook (
{
newsect->used_by_bfd = (PTR) bfd_zalloc (abfd, sizeof(amiga_per_section_type));
newsect->used_by_bfd = (void *) bfd_zalloc (abfd, sizeof(amiga_per_section_type));
newsect->alignment_power = 2;
- if (!strcmp (newsect->name, ".datachip") || !strcmp (newsect->name, ".bsschip"))
+ if (!strcmp (newsect->name, ".datachip") ||
Expand All @@ -18,5 +18,5 @@ Index: demoscene-toolchain/submodules/binutils-gdb/bfd/amigaos.c
+ !strncmp (newsect->name, ".datafast.", strlen(".datafast.")) ||
+ !strncmp (newsect->name, ".bssfast.", strlen(".bssfast.")))
amiga_per_section(newsect)->attribute |= MEMF_FAST;
return TRUE;
return true;
}
2 changes: 1 addition & 1 deletion submodules/binutils-gdb
Submodule binutils-gdb updated 18975 files
1 change: 1 addition & 0 deletions submodules/gcc-bebbo
Submodule gcc-bebbo added at a970bf
68 changes: 67 additions & 1 deletion toolchain-m68k.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
'https://ftp.gnu.org/gnu/bison/bison-1.35.tar.gz',
'https://ftp.gnu.org/gnu/texinfo/texinfo-4.12.tar.gz',
'https://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz',
'https://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.2.1.tar.bz2',
'https://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.6.tar.bz2',
'https://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz',
'https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2',
('https://github.com/askeksa/Shrinkler/archive/refs/tags/v4.7.tar.gz',
'Shrinkler-4.7.tar.gz'),
('https://github.com/emmanuel-marty/salvador/archive/refs/tags/1.4.2.tar.gz',
Expand Down Expand Up @@ -153,7 +157,7 @@ def touch_genfiles(dst):
def download():
with cwd('{archives}'):
for url in URLS:
if type(url) == tuple:
if type(url) is tuple:
url, name = url[0], url[1]
else:
name = path.basename(url)
Expand Down Expand Up @@ -270,6 +274,42 @@ def build():
make('{autoconf}', parallel=True)
make('{autoconf}', 'install')

unpack('{gmp}')
configure('{gmp}',
'--prefix={host}',
'--disable-shared',
'--enable-static')
make('{gmp}', parallel=True)
make('{gmp}', 'install')

unpack('{mpfr}')
configure('{mpfr}',
'--prefix={host}',
'--with-gmp={host}',
'--disable-shared',
'--enable-static')
make('{mpfr}', parallel=True)
make('{mpfr}', 'install')

unpack('{mpc}')
configure('{mpc}',
'--prefix={host}',
'--with-gmp={host}',
'--with-mpfr={host}',
'--disable-shared',
'--enable-static')
make('{mpc}', parallel=True)
make('{mpc}', 'install')

unpack('{isl}')
configure('{isl}',
'--prefix={host}',
'--with-gmp-prefix={host}',
'--disable-shared',
'--enable-static')
make('{isl}', parallel=True)
make('{isl}', 'install')

prepare_target()

unpack('vasm', work_dir='{build}')
Expand Down Expand Up @@ -304,6 +344,7 @@ def build():
'--disable-plugins',
'--disable-werror',
'--disable-tui',
'--with-libgmp-prefix={host}',
'--with-python=' + sys.executable,
'--target=m68k-amigaos',
from_dir='{submodules}/{binutils}')
Expand Down Expand Up @@ -340,6 +381,26 @@ def build():
make('{gcc}', 'all-gcc', MAKEINFO='makeinfo')
make('{gcc}', 'install-gcc', MAKEINFO='makeinfo')

with env(CC=CC, CXX=CXX, CFLAGS=FLAGS, CXXFLAGS=FLAGS):
configure('{gcc_bebbo}',
'--prefix={prefix}',
'--infodir={prefix}/{target}/info',
'--mandir={prefix}/share/man',
'--program-prefix=m68k-amigaos-',
'--program-suffix=-6.5.0b',
'--with-gmp={host}',
'--with-mpfr={host}',
'--with-mpc={host}',
'--with-isl={host}',
'--target=m68k-amigaos',
'--enable-languages=c',
'--enable-version-specific-runtime-libs',
'--disable-nls',
'--disable-libssp',
from_dir='{submodules}/{gcc_bebbo}')
make('{gcc_bebbo}', 'all-gcc', parallel=True)
make('{gcc_bebbo}', 'install-gcc')

with env(CC=CC, CXX=CXX, CFLAGS=FLAGS, CXXFLAGS=FLAGS, PATH=PATH):
fs_uae_bootstrap()
configure('{fsuae}',
Expand Down Expand Up @@ -422,10 +483,15 @@ def clean():
automake='automake-1.15',
autoconf='autoconf-2.13',
texinfo='texinfo-4.12',
gmp='gmp-6.2.1',
mpfr='mpfr-3.1.6',
mpc='mpc-1.0.3',
isl='isl-0.18',
NDK='NDK_3.9',
binutils='binutils-gdb',
fsuae='fs-uae',
gcc='gcc-2.95.3',
gcc_bebbo='gcc-bebbo',
shrinkler='Shrinkler-4.7',
salvador='salvador-1.4.2',
lzsa='lzsa-1.4.1',
Expand Down
Loading