diff --git a/.github/workflows/binutils-gdb-gcc.yml b/.github/workflows/binutils-gdb-gcc.yml index 153fbd24..de4eacde 100644 --- a/.github/workflows/binutils-gdb-gcc.yml +++ b/.github/workflows/binutils-gdb-gcc.yml @@ -41,7 +41,7 @@ jobs: path: binutils-gdb-gcc-linux.tar macos: - runs-on: macos-12 + runs-on: macos-11 steps: - uses: actions/checkout@v3 - run: ci/install-packages-macos.sh @@ -57,6 +57,7 @@ jobs: - run: ci/binutils-gdb/install.sh - run: ci/gcc/install.sh - run: ci/clean-up.sh + - run: ci/bundle-macos.sh - run: ci/archive-macos.sh - uses: actions/upload-artifact@v3 with: diff --git a/bin/darwin/fs-uae/fs-uae b/bin/darwin/fs-uae/fs-uae index 412eba6d..befd443b 100755 Binary files a/bin/darwin/fs-uae/fs-uae and b/bin/darwin/fs-uae/fs-uae differ diff --git a/bin/darwin/fs-uae/fs-uae.dat b/bin/darwin/fs-uae/fs-uae.dat index 66d4cb49..b976e15a 100644 Binary files a/bin/darwin/fs-uae/fs-uae.dat and b/bin/darwin/fs-uae/fs-uae.dat differ diff --git a/bin/darwin/fs-uae/libSDL2-2.0.0.dylib b/bin/darwin/fs-uae/lib/libSDL2-2.0.0.dylib similarity index 50% rename from bin/darwin/fs-uae/libSDL2-2.0.0.dylib rename to bin/darwin/fs-uae/lib/libSDL2-2.0.0.dylib index 83a2ac1c..76657152 100644 Binary files a/bin/darwin/fs-uae/libSDL2-2.0.0.dylib and b/bin/darwin/fs-uae/lib/libSDL2-2.0.0.dylib differ diff --git a/bin/darwin/fs-uae/libSDL2_ttf-2.0.0.dylib b/bin/darwin/fs-uae/lib/libSDL2_ttf-2.0.0.dylib similarity index 99% rename from bin/darwin/fs-uae/libSDL2_ttf-2.0.0.dylib rename to bin/darwin/fs-uae/lib/libSDL2_ttf-2.0.0.dylib index a528fba1..c3d41c7e 100644 Binary files a/bin/darwin/fs-uae/libSDL2_ttf-2.0.0.dylib and b/bin/darwin/fs-uae/lib/libSDL2_ttf-2.0.0.dylib differ diff --git a/bin/darwin/fs-uae/libfreetype.6.dylib b/bin/darwin/fs-uae/lib/libfreetype.6.dylib similarity index 99% rename from bin/darwin/fs-uae/libfreetype.6.dylib rename to bin/darwin/fs-uae/lib/libfreetype.6.dylib index a0dcc68d..d72dd9bb 100644 Binary files a/bin/darwin/fs-uae/libfreetype.6.dylib and b/bin/darwin/fs-uae/lib/libfreetype.6.dylib differ diff --git a/bin/darwin/fs-uae/lib/libglib-2.0.0.dylib b/bin/darwin/fs-uae/lib/libglib-2.0.0.dylib new file mode 100644 index 00000000..66b64765 Binary files /dev/null and b/bin/darwin/fs-uae/lib/libglib-2.0.0.dylib differ diff --git a/bin/darwin/fs-uae/libgraphite2.3.dylib b/bin/darwin/fs-uae/lib/libgraphite2.3.dylib similarity index 99% rename from bin/darwin/fs-uae/libgraphite2.3.dylib rename to bin/darwin/fs-uae/lib/libgraphite2.3.dylib index a6f46d56..8dc4d2b6 100644 Binary files a/bin/darwin/fs-uae/libgraphite2.3.dylib and b/bin/darwin/fs-uae/lib/libgraphite2.3.dylib differ diff --git a/bin/darwin/fs-uae/libgthread-2.0.0.dylib b/bin/darwin/fs-uae/lib/libgthread-2.0.0.dylib similarity index 98% rename from bin/darwin/fs-uae/libgthread-2.0.0.dylib rename to bin/darwin/fs-uae/lib/libgthread-2.0.0.dylib index d1bfc462..29e599dc 100644 Binary files a/bin/darwin/fs-uae/libgthread-2.0.0.dylib and b/bin/darwin/fs-uae/lib/libgthread-2.0.0.dylib differ diff --git a/bin/darwin/fs-uae/lib/libharfbuzz.0.dylib b/bin/darwin/fs-uae/lib/libharfbuzz.0.dylib new file mode 100644 index 00000000..ca33f533 Binary files /dev/null and b/bin/darwin/fs-uae/lib/libharfbuzz.0.dylib differ diff --git a/bin/darwin/fs-uae/libintl.8.dylib b/bin/darwin/fs-uae/lib/libintl.8.dylib similarity index 99% rename from bin/darwin/fs-uae/libintl.8.dylib rename to bin/darwin/fs-uae/lib/libintl.8.dylib index 469dc02c..3f1fa93b 100644 Binary files a/bin/darwin/fs-uae/libintl.8.dylib and b/bin/darwin/fs-uae/lib/libintl.8.dylib differ diff --git a/bin/darwin/fs-uae/libmpeg2.0.dylib b/bin/darwin/fs-uae/lib/libmpeg2.0.dylib similarity index 99% rename from bin/darwin/fs-uae/libmpeg2.0.dylib rename to bin/darwin/fs-uae/lib/libmpeg2.0.dylib index 4c7871a1..83ba5bc9 100644 Binary files a/bin/darwin/fs-uae/libmpeg2.0.dylib and b/bin/darwin/fs-uae/lib/libmpeg2.0.dylib differ diff --git a/bin/darwin/fs-uae/libmpeg2convert.0.dylib b/bin/darwin/fs-uae/lib/libmpeg2convert.0.dylib similarity index 99% rename from bin/darwin/fs-uae/libmpeg2convert.0.dylib rename to bin/darwin/fs-uae/lib/libmpeg2convert.0.dylib index 4b9b13b1..71d7ce03 100644 Binary files a/bin/darwin/fs-uae/libmpeg2convert.0.dylib and b/bin/darwin/fs-uae/lib/libmpeg2convert.0.dylib differ diff --git a/bin/darwin/fs-uae/lib/libpcre2-8.0.dylib b/bin/darwin/fs-uae/lib/libpcre2-8.0.dylib new file mode 100644 index 00000000..974883ec Binary files /dev/null and b/bin/darwin/fs-uae/lib/libpcre2-8.0.dylib differ diff --git a/bin/darwin/fs-uae/libpng16.16.dylib b/bin/darwin/fs-uae/lib/libpng16.16.dylib similarity index 99% rename from bin/darwin/fs-uae/libpng16.16.dylib rename to bin/darwin/fs-uae/lib/libpng16.16.dylib index fb6c39cf..07e2dec2 100644 Binary files a/bin/darwin/fs-uae/libpng16.16.dylib and b/bin/darwin/fs-uae/lib/libpng16.16.dylib differ diff --git a/bin/darwin/fs-uae/libglib-2.0.0.dylib b/bin/darwin/fs-uae/libglib-2.0.0.dylib deleted file mode 100644 index 3e8db80e..00000000 Binary files a/bin/darwin/fs-uae/libglib-2.0.0.dylib and /dev/null differ diff --git a/bin/darwin/fs-uae/libharfbuzz.0.dylib b/bin/darwin/fs-uae/libharfbuzz.0.dylib deleted file mode 100644 index b439b982..00000000 Binary files a/bin/darwin/fs-uae/libharfbuzz.0.dylib and /dev/null differ diff --git a/bin/darwin/fs-uae/libpcre2-8.0.dylib b/bin/darwin/fs-uae/libpcre2-8.0.dylib deleted file mode 100644 index 766bc8d6..00000000 Binary files a/bin/darwin/fs-uae/libpcre2-8.0.dylib and /dev/null differ diff --git a/bin/darwin/fs-uae/libportmidi.0.dylib b/bin/darwin/fs-uae/libportmidi.0.dylib deleted file mode 100644 index a359aef6..00000000 Binary files a/bin/darwin/fs-uae/libportmidi.0.dylib and /dev/null differ diff --git a/bin/darwin/fs-uae/libz.1.dylib b/bin/darwin/fs-uae/libz.1.dylib deleted file mode 100644 index 0d49c120..00000000 Binary files a/bin/darwin/fs-uae/libz.1.dylib and /dev/null differ diff --git a/bin/darwin/opt/bin/m68k-amiga-elf-addr2line b/bin/darwin/opt/bin/m68k-amiga-elf-addr2line index 9445952c..c67a1226 100755 Binary files a/bin/darwin/opt/bin/m68k-amiga-elf-addr2line and b/bin/darwin/opt/bin/m68k-amiga-elf-addr2line differ diff --git a/bin/darwin/opt/bin/m68k-amiga-elf-as b/bin/darwin/opt/bin/m68k-amiga-elf-as index 527bcb62..819f080c 100755 Binary files a/bin/darwin/opt/bin/m68k-amiga-elf-as and b/bin/darwin/opt/bin/m68k-amiga-elf-as differ diff --git a/bin/darwin/opt/bin/m68k-amiga-elf-gcc b/bin/darwin/opt/bin/m68k-amiga-elf-gcc index fdfc160f..dfdb11c8 100755 Binary files a/bin/darwin/opt/bin/m68k-amiga-elf-gcc and b/bin/darwin/opt/bin/m68k-amiga-elf-gcc differ diff --git a/bin/darwin/opt/bin/m68k-amiga-elf-gdb b/bin/darwin/opt/bin/m68k-amiga-elf-gdb index 443e8267..2235f5c5 100755 Binary files a/bin/darwin/opt/bin/m68k-amiga-elf-gdb and b/bin/darwin/opt/bin/m68k-amiga-elf-gdb differ diff --git a/bin/darwin/opt/bin/m68k-amiga-elf-ld b/bin/darwin/opt/bin/m68k-amiga-elf-ld index 209b9ac2..dbbe0e73 100755 Binary files a/bin/darwin/opt/bin/m68k-amiga-elf-ld and b/bin/darwin/opt/bin/m68k-amiga-elf-ld differ diff --git a/bin/darwin/opt/bin/m68k-amiga-elf-objdump b/bin/darwin/opt/bin/m68k-amiga-elf-objdump index 5816df0b..9f5364f3 100755 Binary files a/bin/darwin/opt/bin/m68k-amiga-elf-objdump and b/bin/darwin/opt/bin/m68k-amiga-elf-objdump differ diff --git a/bin/darwin/opt/lib/liblzma.5.dylib b/bin/darwin/opt/lib/liblzma.5.dylib new file mode 100644 index 00000000..997365d9 Binary files /dev/null and b/bin/darwin/opt/lib/liblzma.5.dylib differ diff --git a/bin/darwin/opt/lib/libzstd.1.dylib b/bin/darwin/opt/lib/libzstd.1.dylib new file mode 100644 index 00000000..1900f407 Binary files /dev/null and b/bin/darwin/opt/lib/libzstd.1.dylib differ diff --git a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/cc1 b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/cc1 old mode 100644 new mode 100755 index a7d56118..1f6be893 Binary files a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/cc1 and b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/cc1 differ diff --git a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/cc1plus b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/cc1plus old mode 100644 new mode 100755 index 3f0fdc4c..2b3a5753 Binary files a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/cc1plus and b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/cc1plus differ diff --git a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/collect2 b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/collect2 old mode 100644 new mode 100755 index c0e48eaf..323ab203 Binary files a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/collect2 and b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/collect2 differ diff --git a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/liblto_plugin.la b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/liblto_plugin.la old mode 100644 new mode 100755 diff --git a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/liblto_plugin.so b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/liblto_plugin.so old mode 100644 new mode 100755 index ca1da005..6bdb4876 Binary files a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/liblto_plugin.so and b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/liblto_plugin.so differ diff --git a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/lto-wrapper b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/lto-wrapper old mode 100644 new mode 100755 index 7f72851a..8d6a7eb9 Binary files a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/lto-wrapper and b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/lto-wrapper differ diff --git a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/lto1 b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/lto1 old mode 100644 new mode 100755 index 8677ab5c..0abd3036 Binary files a/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/lto1 and b/bin/darwin/opt/libexec/gcc/m68k-amiga-elf/12.2.0/lto1 differ diff --git a/bin/darwin/opt/m68k-amiga-elf/bin/ar b/bin/darwin/opt/m68k-amiga-elf/bin/ar index 9703161e..6d490a8e 100755 Binary files a/bin/darwin/opt/m68k-amiga-elf/bin/ar and b/bin/darwin/opt/m68k-amiga-elf/bin/ar differ diff --git a/bin/darwin/opt/m68k-amiga-elf/bin/as b/bin/darwin/opt/m68k-amiga-elf/bin/as index 527bcb62..ea65e3e0 100755 Binary files a/bin/darwin/opt/m68k-amiga-elf/bin/as and b/bin/darwin/opt/m68k-amiga-elf/bin/as differ diff --git a/bin/darwin/opt/m68k-amiga-elf/bin/ld b/bin/darwin/opt/m68k-amiga-elf/bin/ld index 209b9ac2..8010a691 100755 Binary files a/bin/darwin/opt/m68k-amiga-elf/bin/ld and b/bin/darwin/opt/m68k-amiga-elf/bin/ld differ diff --git a/bin/darwin/opt/m68k-amiga-elf/bin/ld.bfd b/bin/darwin/opt/m68k-amiga-elf/bin/ld.bfd index 209b9ac2..8010a691 100755 Binary files a/bin/darwin/opt/m68k-amiga-elf/bin/ld.bfd and b/bin/darwin/opt/m68k-amiga-elf/bin/ld.bfd differ diff --git a/bin/darwin/opt/m68k-amiga-elf/bin/nm b/bin/darwin/opt/m68k-amiga-elf/bin/nm index d17f9cf8..bdb2d7b6 100755 Binary files a/bin/darwin/opt/m68k-amiga-elf/bin/nm and b/bin/darwin/opt/m68k-amiga-elf/bin/nm differ diff --git a/bin/darwin/opt/m68k-amiga-elf/bin/objcopy b/bin/darwin/opt/m68k-amiga-elf/bin/objcopy index 749c874e..b611f37b 100755 Binary files a/bin/darwin/opt/m68k-amiga-elf/bin/objcopy and b/bin/darwin/opt/m68k-amiga-elf/bin/objcopy differ diff --git a/bin/darwin/opt/m68k-amiga-elf/bin/objdump b/bin/darwin/opt/m68k-amiga-elf/bin/objdump index 5816df0b..74ddb188 100755 Binary files a/bin/darwin/opt/m68k-amiga-elf/bin/objdump and b/bin/darwin/opt/m68k-amiga-elf/bin/objdump differ diff --git a/bin/darwin/opt/m68k-amiga-elf/bin/ranlib b/bin/darwin/opt/m68k-amiga-elf/bin/ranlib index cabe3ca7..82ee7662 100755 Binary files a/bin/darwin/opt/m68k-amiga-elf/bin/ranlib and b/bin/darwin/opt/m68k-amiga-elf/bin/ranlib differ diff --git a/bin/darwin/opt/m68k-amiga-elf/bin/readelf b/bin/darwin/opt/m68k-amiga-elf/bin/readelf index 452662ab..01e37b61 100755 Binary files a/bin/darwin/opt/m68k-amiga-elf/bin/readelf and b/bin/darwin/opt/m68k-amiga-elf/bin/readelf differ diff --git a/bin/darwin/opt/m68k-amiga-elf/bin/strip b/bin/darwin/opt/m68k-amiga-elf/bin/strip index 9880583b..083e1abd 100755 Binary files a/bin/darwin/opt/m68k-amiga-elf/bin/strip and b/bin/darwin/opt/m68k-amiga-elf/bin/strip differ diff --git a/bin/linux/fs-uae/fs-uae b/bin/linux/fs-uae/fs-uae index fded7ff6..20f4f589 100755 Binary files a/bin/linux/fs-uae/fs-uae and b/bin/linux/fs-uae/fs-uae differ diff --git a/bin/linux/fs-uae/fs-uae.dat b/bin/linux/fs-uae/fs-uae.dat index dfe09c95..f68db24d 100644 Binary files a/bin/linux/fs-uae/fs-uae.dat and b/bin/linux/fs-uae/fs-uae.dat differ diff --git a/ci/bundle-macos.sh b/ci/bundle-macos.sh new file mode 100755 index 00000000..98ca06df --- /dev/null +++ b/ci/bundle-macos.sh @@ -0,0 +1,11 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' +set -x + +VERSION=12.2.0 + +cd output +find bin -type f -perm +111 -exec ../ci/make_portable.sh {} ../lib \; +find libexec/gcc/m68k-amiga-elf -type f -exec ../ci/make_portable.sh {} ../../../../lib \; +find m68k-amiga-elf/bin -type f -perm +111 -exec ../ci/make_portable.sh {} ../../lib \; diff --git a/ci/make_portable.sh b/ci/make_portable.sh new file mode 100755 index 00000000..5f60f3f2 --- /dev/null +++ b/ci/make_portable.sh @@ -0,0 +1,102 @@ +#!/usr/bin/env bash + +# Licensed by author Alex Birch under CC BY-SA 4.0 +# https://creativecommons.org/licenses/by-sa/4.0/ + +# Example input: +# ./make_portable.sh mycoolbinary +# where mycoolbinary is a mach-o object file +# (for example an executable binary or a .dylib) +# +# this script rewrites your file's every environment-specific +# dynamic link (recursively!) +# such that they point to local .dylibs. +# these .dylibs are then copied to a folder lib, next to your binary +# +# by "environment-specific" I mean any link to a .dylib under /usr/local + +set -o pipefail + +# error handler by Charles Duffy +# https://stackoverflow.com/q/64786 +error() { + local parent_lineno="$1" + local message="$2" + local code="${3:-1}" + if [[ -n "$message" ]] ; then + echo "Error on or near line ${parent_lineno}: ${message}; exiting with status ${code}" + else + echo "Error on or near line ${parent_lineno}; exiting with status ${code}" + fi + exit "${code}" +} +trap 'error ${LINENO}' ERR + +BINARY="$1" +BINARYDIR=$(dirname "$BINARY") +LIBREL="$2" +LIB="$BINARYDIR/$LIBREL" + +echo $BINARY +echo $LIBREL + +# find every LC_LOAD_DYLIB command in the obj file +# filter to just loads under /usr/local +# print the absolute path of each such dylib +get_env_specific_direct_dependencies () { + # otool -L shows us every LC_LOAD_DYLIB plus LC_ID_DYLIB + # otool -D shows us just LC_ID_DYLIB + ALL_DYLIBS=$(otool -L "$1" | awk 'NR>1') + DYLIB_ID=$(otool -D "$1" | awk 'NR>1') + if [ -z "$DYLIB_ID" ]; then + DIRECT_DEPS="$ALL_DYLIBS" + else + DIRECT_DEPS=$(echo "$ALL_DYLIBS" | grep -v "$DYLIB_ID") + fi + echo "$DIRECT_DEPS" \ + | awk '/\/usr\/local\//,/.dylib/ {print $1}' +} + +# lookup LC_LOAD_DYLIB commands in an obj file, +# then follow those loads and ask the same of each +# of its dylibs, recursively +get_env_specific_dependencies_recursive () { + while read -r obj; do + [ -z "$obj" ] && continue + echo "$obj" + get_env_specific_dependencies_recursive "$obj" + done < <(get_env_specific_direct_dependencies "$1") +} + +DEP_PATHS=$(get_env_specific_dependencies_recursive "$BINARY") + +mkdir -p "$LIB" +# copy each distinct dylib in the dependency tree into our lib folder +echo "$DEP_PATHS" \ +| sort \ +| uniq \ +| xargs -I'{}' cp {} "$LIB/" +chmod +w "$LIB"/*.dylib + +while read -r obj; do + [ -z "$obj" ] && continue + OBJ_LEAF_NAME=$(echo "$obj" | awk -F'/' '{print $NF}') + echo $OBJ_LEAF_NAME + [ -z "$OBJ_LEAF_NAME" ] && continue + # rewrite the install name of this obj file. completely optional. + # provides good default for future people who link to it. + install_name_tool -id "@rpath/$OBJ_LEAF_NAME" "$obj" + + # iterate over every LC_LOAD_DYLIB command in the objfile + while read -r load; do + [ -z "$load" ] && continue + LOAD_LEAF_NAME=$(echo "$load" | awk -F'/' '{print $NF}') + # rewrite a LC_LOAD_DYLIB command in this obj file + # to point relative to @rpath + install_name_tool -change "$load" "@rpath/$LOAD_LEAF_NAME" "$obj" + done < <(get_env_specific_direct_dependencies "$obj") +done < <(cat <(echo "$BINARY") <(echo "$DEP_PATHS" | awk -F'/' -v l="$LIB" -v OFS='/' '{print l,$NF}')) + +# define in our binary what it should expand the +# runtime search path @rpath to +install_name_tool -add_rpath "@loader_path/$LIBREL" "$BINARY" diff --git a/src/amigaDebug.ts b/src/amigaDebug.ts index d0878472..3d9164ae 100644 --- a/src/amigaDebug.ts +++ b/src/amigaDebug.ts @@ -377,7 +377,7 @@ export class AmigaDebugSession extends LoggingDebugSession { config.set('hard_drive_0', dh0Path); config.set('hard_drive_1', exePath); // debugging options - config.set('remote_debugger', "1000"); + config.set('remote_debugger', "20"); config.set('remote_debugger_port', "2345"); config.set('remote_debugger_trigger', debugTrigger);