Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
6 changes: 4 additions & 2 deletions .github/workflows/macos-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ jobs:
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: install dependencies
run: brew install --verbose nikitabobko/tap/brew-install-path
Comment on lines +22 to +23
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Pin the tap commit to avoid supply-chain drift.

Installing the external brew command from a moving tap HEAD can break CI unexpectedly. Pin the tap to a known commit, then install the formula.

-    - name: install dependencies
-      run: brew install --verbose nikitabobko/tap/brew-install-path
+    - name: install brew-install-path (pinned)
+      run: |
+        brew tap nikitabobko/tap https://github.com/nikitabobko/homebrew-tap
+        git -C "$(brew --repo nikitabobko/tap)" checkout <commit-sha>
+        brew install --verbose nikitabobko/tap/brew-install-path
+      shell: bash

Replace with the tested revision.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: install dependencies
run: brew install --verbose nikitabobko/tap/brew-install-path
- name: install brew-install-path (pinned)
run: |
brew tap nikitabobko/tap https://github.com/nikitabobko/homebrew-tap
git -C "$(brew --repo nikitabobko/tap)" checkout <commit-sha>
brew install --verbose nikitabobko/tap/brew-install-path
shell: bash
🤖 Prompt for AI Agents
.github/workflows/macos-toolchain.yml lines 22-23: currently installing an
external brew formula directly from the tap HEAD—pin the tap to a specific
commit to avoid supply-chain drift by (1) tapping the nikitabobko/tap repo, (2)
fetching and checking out the tested <commit-sha> in the tap repository, and
then (3) running the brew install of nikitabobko/tap/brew-install-path; replace
<commit-sha> with the known-good revision and ensure these steps are executed in
the workflow before the installation step.

- name: build mips binutils
run: brew install ./tools/macos-mips/mipsel-none-elf-binutils.rb --debug
run: brew install-path --verbose ./tools/macos-mips/mipsel-none-elf-binutils.rb
- name: build mips gcc
run: brew install ./tools/macos-mips/mipsel-none-elf-gcc.rb --debug
run: brew install-path --verbose ./tools/macos-mips/mipsel-none-elf-gcc.rb
- name: build openbios
run: make -C ./src/mips/openbios
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,9 @@ You need MacOS Catalina or later with the latest XCode to build, as well as a fe

Compiling OpenBIOS will require a mips compiler, that you can generate using the following commands:
```bash
brew install ./tools/macos-mips/mipsel-none-elf-binutils.rb
brew install ./tools/macos-mips/mipsel-none-elf-gcc.rb
brew install nikitabobko/tap/brew-install-path
brew install-path ./tools/macos-mips/mipsel-none-elf-binutils.rb
brew install-path ./tools/macos-mips/mipsel-none-elf-gcc.rb
```

Then, you can compile OpenBIOS using `make -C ./src/mips/openbios`.
Expand Down
5 changes: 3 additions & 2 deletions src/mips/psyqo/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ trizen -S cross-mipsel-linux-gnu-binutils cross-mipsel-linux-gnu-gcc
Using [Homebrew](https://brew.sh/), you can install the mips toolchain after downloading [these two scripts](https://github.com/grumpycoders/pcsx-redux/tree/main/tools/macos-mips) (or cloning the whole PCSX-Redux repository).

```bash
brew install ./tools/macos-mips/mipsel-none-elf-binutils.rb
brew install ./tools/macos-mips/mipsel-none-elf-gcc.rb
brew install nikitabobko/tap/brew-install-path
brew install-path ./tools/macos-mips/mipsel-none-elf-binutils.rb
brew install-path ./tools/macos-mips/mipsel-none-elf-gcc.rb
```

## Windows
Expand Down
12 changes: 6 additions & 6 deletions tools/linux-mips/spawn-compiler.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,21 @@ set -ex

PREFIX=${PREFIX:-"/usr/local"}

for url in https://ftpmirror.gnu.org/gnu/binutils/binutils-2.43.tar.gz https://mirrors.kernel.org/gnu/binutils/binutils-2.43.tar.gz ; do
for url in https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.gz https://mirrors.kernel.org/gnu/binutils/binutils-2.45.tar.gz ; do
wget --max-redirect=2 --timeout=60 --continue --trust-server-names $url && break
done
tar xvfz binutils-2.43.tar.gz
cd binutils-2.43
tar xvfz binutils-2.45.tar.gz
cd binutils-2.45
./configure --target=mipsel-none-elf --disable-multilib --disable-nls --disable-werror --prefix=$PREFIX
make
make install-strip
cd ..

for url in https://ftpmirror.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.gz https://mirrors.kernel.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.gz ; do
for url in https://ftpmirror.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz https://mirrors.kernel.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.gz ; do
wget --max-redirect=2 --timeout=60 --continue --trust-server-names $url && break
done
tar xvfz gcc-14.2.0.tar.gz
cd gcc-14.2.0
tar xvfz gcc-15.2.0.tar.gz
cd gcc-15.2.0
./contrib/download_prerequisites
mkdir build
cd build
Expand Down
6 changes: 3 additions & 3 deletions tools/macos-mips/mipsel-none-elf-binutils.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class MipselNoneElfBinutils < Formula
desc "FSF Binutils for mipsel cross development"
homepage "https://www.gnu.org/software/binutils/"
url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.43.tar.gz"
mirror "https://mirrors.kernel.org/gnu/binutils/binutils-2.43.tar.gz"
sha256 "025c436d15049076ebe511d29651cc4785ee502965a8839936a65518582bdd64"
url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.gz"
mirror "https://mirrors.kernel.org/gnu/binutils/binutils-2.45.tar.gz"
sha256 "8a3eb4b10e7053312790f21ee1a38f7e2bbd6f4096abb590d3429e5119592d96"

depends_on "texinfo" => :build

Expand Down
6 changes: 3 additions & 3 deletions tools/macos-mips/mipsel-none-elf-gcc.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class MipselNoneElfGcc < Formula
desc "The GNU compiler collection for mipsel"
homepage "https://gcc.gnu.org"
url "https://ftpmirror.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
mirror "https://mirrors.kernel.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
sha256 "a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9"
url "https://ftpmirror.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz"
mirror "https://mirrors.kernel.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz"
sha256 "438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e"

depends_on "gmp"
depends_on "mipsel-none-elf-binutils"
Expand Down
6 changes: 3 additions & 3 deletions tools/macos-mips/mipsel-none-elf-gdb.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class MipselNoneElfGdb < Formula
desc "GDB: The GNU Project Debugger compiled for Mips"
homepage "https://sourceware.org/gdb/"
url "https://ftpmirror.gnu.org/gnu/gdb/gdb-15.1.tar.xz"
mirror "https://mirrors.kernel.org/gnu/gdb/gdb-15.1.tar.xz"
sha256 "38254eacd4572134bca9c5a5aa4d4ca564cbbd30c369d881f733fb6b903354f2"
url "https://ftpmirror.gnu.org/gnu/gdb/gdb-16.3.tar.xz"
mirror "https://mirrors.kernel.org/gnu/gdb/gdb-16.3.tar.xz"
sha256 "bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5"

# inspired by https://github.com/orgs/Homebrew/discussions/1114#discussioncomment-8863715

Expand Down
6 changes: 3 additions & 3 deletions tools/vscode-extension/scripts/mipsel-none-elf-binutils.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class MipselNoneElfBinutils < Formula
desc "FSF Binutils for mipsel cross development"
homepage "https://www.gnu.org/software/binutils/"
url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.43.tar.gz"
mirror "https://mirrors.kernel.org/gnu/binutils/binutils-2.43.tar.gz"
sha256 "025c436d15049076ebe511d29651cc4785ee502965a8839936a65518582bdd64"
url "https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.gz"
mirror "https://mirrors.kernel.org/gnu/binutils/binutils-2.45.tar.gz"
sha256 "8a3eb4b10e7053312790f21ee1a38f7e2bbd6f4096abb590d3429e5119592d96"

depends_on "texinfo" => :build

Expand Down
6 changes: 3 additions & 3 deletions tools/vscode-extension/scripts/mipsel-none-elf-gcc.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class MipselNoneElfGcc < Formula
desc "The GNU compiler collection for mipsel"
homepage "https://gcc.gnu.org"
url "https://ftpmirror.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
mirror "https://mirrors.kernel.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz"
sha256 "a7b39bc69cbf9e25826c5a60ab26477001f7c08d85cec04bc0e29cabed6f3cc9"
url "https://ftpmirror.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz"
mirror "https://mirrors.kernel.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz"
sha256 "438fd996826b0c82485a29da03a72d71d6e3541a83ec702df4271f6fe025d24e"

depends_on "gmp"
depends_on "mipsel-none-elf-binutils"
Expand Down
6 changes: 3 additions & 3 deletions tools/vscode-extension/scripts/mipsel-none-elf-gdb.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class MipselNoneElfGdb < Formula
desc "GDB: The GNU Project Debugger compiled for Mips"
homepage "https://sourceware.org/gdb/"
url "https://ftpmirror.gnu.org/gnu/gdb/gdb-15.1.tar.xz"
mirror "https://mirrors.kernel.org/gnu/gdb/gdb-15.1.tar.xz"
sha256 "38254eacd4572134bca9c5a5aa4d4ca564cbbd30c369d881f733fb6b903354f2"
url "https://ftpmirror.gnu.org/gnu/gdb/gdb-16.3.tar.xz"
mirror "https://mirrors.kernel.org/gnu/gdb/gdb-16.3.tar.xz"
sha256 "bcfcd095528a987917acf9fff3f1672181694926cc18d609c99d0042c00224c5"

# inspired by https://github.com/orgs/Homebrew/discussions/1114#discussioncomment-8863715

Expand Down
32 changes: 16 additions & 16 deletions tools/vscode-extension/tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ let extensionUri
let globalStorageUri
let requiresReboot = false

async function checkInstalled (name) {
async function checkInstalled(name) {
if (tools[name].installed === undefined) {
tools[name].installed = await tools[name].check()
}
return tools[name].installed
}

async function checkCommands (commands, args) {
async function checkCommands(commands, args) {
for (const command of commands) {
try {
await execFile(command, args)
Expand All @@ -42,7 +42,7 @@ async function checkCommands (commands, args) {
let mipsInstalling = false
let win32MipsToolsInstalling = false

async function installMips () {
async function installMips() {
if (mipsInstalling) return
mipsInstalling = true
try {
Expand All @@ -62,7 +62,7 @@ async function installMips () {
}
}

async function installToolchain () {
async function installToolchain() {
switch (process.platform) {
case 'win32':
try {
Expand Down Expand Up @@ -107,9 +107,9 @@ async function installToolchain () {
'scripts',
'mipsel-none-elf-gcc.rb'
).fsPath
await terminal.run('brew', ['install', 'nikitabobko/tap/brew-install-path'])
await terminal.run('brew', [
'install',
'--formula',
'install-path',
binutilsScriptPath,
gccScriptPath
])
Expand Down Expand Up @@ -139,9 +139,9 @@ async function installToolchain () {
'scripts',
'mipsel-none-elf-gcc.rb'
).fsPath
await terminal.run('brew', ['install', 'nikitabobko/tap/brew-install-path'])
await terminal.run('brew', [
'install',
'--formula',
'install-path',
binutilsScriptPath,
gccScriptPath
])
Expand Down Expand Up @@ -170,7 +170,7 @@ async function installToolchain () {
}
}

async function installGDB () {
async function installGDB() {
switch (process.platform) {
case 'win32':
try {
Expand Down Expand Up @@ -240,7 +240,7 @@ async function installGDB () {
}
}

async function installMake () {
async function installMake() {
switch (process.platform) {
case 'win32':
try {
Expand Down Expand Up @@ -285,7 +285,7 @@ async function installMake () {
}
}

async function installCMake () {
async function installCMake() {
switch (process.platform) {
case 'win32':
const release = await octokit.rest.repos.getLatestRelease({
Expand Down Expand Up @@ -361,7 +361,7 @@ async function installCMake () {
}
}

async function installGit () {
async function installGit() {
switch (process.platform) {
case 'win32': {
const release = await octokit.rest.repos.getLatestRelease({
Expand Down Expand Up @@ -400,7 +400,7 @@ async function installGit () {
}
}

async function installPython () {
async function installPython() {
switch (process.platform) {
case 'win32':
const tags = await octokit.rest.repos.listTags({
Expand Down Expand Up @@ -457,7 +457,7 @@ async function installPython () {
}
}

async function checkPython () {
async function checkPython() {
switch (process.platform) {
case 'win32':
/*
Expand Down Expand Up @@ -510,7 +510,7 @@ async function checkPython () {
}
}

function unpackPsyq (destination) {
function unpackPsyq(destination) {
const filename = vscode.Uri.joinPath(
globalStorageUri,
tools.psyq.filename
Expand Down Expand Up @@ -666,7 +666,7 @@ const tools = {
}
}

function checkLocalFile (filename) {
function checkLocalFile(filename) {
return new Promise((resolve) => {
filename = vscode.Uri.joinPath(globalStorageUri, filename).fsPath
fs.access(filename, fs.constants.F_OK, (err) => {
Expand Down
18 changes: 9 additions & 9 deletions tools/win32-gdb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# escape=`

# Dockerfile to generate the Windows gdb-multiarch-15.1.zip package.
# Dockerfile to generate the Windows gdb-multiarch-16.3.zip package.

FROM mcr.microsoft.com/windows/servercore:ltsc2022
WORKDIR C:\windows\temp
SHELL ["powershell", "-command"]
SHELL ["powershell", "-command"]

RUN Invoke-WebRequest -UserAgent 'DockerCI' -outfile 7zsetup.exe http://www.7-zip.org/a/7z1604-x64.exe

Expand Down Expand Up @@ -45,23 +45,23 @@ RUN C:\msys64\usr\bin\bash.exe -l -c 'pacman -S --needed --noconfirm mingw-w64-x
RUN C:\msys64\usr\bin\bash.exe -l -c 'pacman -S --needed --noconfirm mingw-w64-x86_64-python mingw-w64-x86_64-readline'
RUN C:\msys64\usr\bin\bash.exe -l -c 'pacman -Scc --noconfirm'

ARG GDB=https://ftpmirror.gnu.org/gnu/gdb/gdb-15.1.tar.xz
ARG GDB=https://ftpmirror.gnu.org/gnu/gdb/gdb-16.3.tar.xz

RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest $env:GDB -OutFile "C:\Windows\Temp\gdb-15.1.tar.xz"; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList e, "C:\Windows\Temp\gdb-15.1.tar.xz", `-oC:\Windows\Temp\ -NoNewWindow -PassThru -Wait; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList x, "C:\Windows\Temp\gdb-15.1.tar", `-oC:\ -NoNewWindow -PassThru -Wait; `
Invoke-WebRequest $env:GDB -OutFile "C:\Windows\Temp\gdb-16.3.tar.xz"; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList e, "C:\Windows\Temp\gdb-16.3.tar.xz", `-oC:\Windows\Temp\ -NoNewWindow -PassThru -Wait; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList x, "C:\Windows\Temp\gdb-16.3.tar", `-oC:\ -NoNewWindow -PassThru -Wait; `
Remove-Item @('C:\Windows\Temp\*', 'C:\Users\*\Appdata\Local\Temp\*') -Force -Recurse;

ENV MSYSTEM MINGW64

RUN C:\msys64\usr\bin\bash.exe -l -c 'mkdir /BUILD && cd /BUILD && /c/gdb-15.1/configure --disable-gdbtk --disable-shared --disable-readline --with-system-readline --with-expat --with-system-zlib --without-guile --without-babeltrace --enable-tui --with-lzma --without-python --with-xxhash --with-mpfr=/mingw64 --enable-64-bit-bfd --enable-targets=all --disable-sim --prefix=/DIST || (cat /BUILD/config.log && exit 1)'
RUN C:\msys64\usr\bin\bash.exe -l -c 'mkdir /BUILD && cd /BUILD && /c/gdb-16.3/configure --disable-gdbtk --disable-shared --disable-readline --with-system-readline --with-expat --with-system-zlib --without-guile --without-babeltrace --enable-tui --with-lzma --without-python --with-xxhash --with-mpfr=/mingw64 --enable-64-bit-bfd --enable-targets=all --disable-sim --prefix=/DIST || (cat /BUILD/config.log && exit 1)'

RUN C:\msys64\usr\bin\bash.exe -l -c 'LOADLIBES=-lws2_32\ -lbcrypt make -C /BUILD all'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /BUILD install-strip'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cd /DIST/bin && ldd *.exe | cut -f2 -d\> | cut -f2 -d\ | grep mingw64 | while read f ; do cp $f . ; done'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cp /c/gdb-15.1/COPYING* /DIST'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cp /c/gdb-16.3/COPYING* /DIST'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cp /DIST/bin/gdb.exe /DIST/bin/gdb-multiarch.exe'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cd /DIST && zip /c/gdb-multiarch-15.1.zip . -r'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cd /DIST && zip /c/gdb-multiarch-16.3.zip . -r'

CMD C:\msys64\usr\bin\bash.exe -l
36 changes: 18 additions & 18 deletions tools/win32-mips/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,36 +45,36 @@ RUN C:\msys64\usr\bin\bash.exe -l -c 'pacman -S --needed --noconfirm mingw-w64-x
RUN C:\msys64\usr\bin\bash.exe -l -c 'pacman -S --needed --noconfirm mingw-w64-x86_64-python mingw-w64-x86_64-readline'
RUN C:\msys64\usr\bin\bash.exe -l -c 'pacman -Scc --noconfirm'

ARG BINUTILS=https://ftpmirror.gnu.org/gnu/binutils/binutils-2.43.tar.xz
ARG GCC=https://ftpmirror.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz
ARG BINUTILS=https://ftpmirror.gnu.org/gnu/binutils/binutils-2.45.tar.xz
ARG GCC=https://ftpmirror.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz

RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest $env:BINUTILS -OutFile "C:\Windows\Temp\binutils-2.43.tar.xz"; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList e, "C:\Windows\Temp\binutils-2.43.tar.xz", `-y, `-oC:\Windows\Temp\ -NoNewWindow -PassThru -Wait; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList x, "C:\Windows\Temp\binutils-2.43.tar", `-y, `-oC:\ -NoNewWindow -PassThru -Wait; `
Invoke-WebRequest $env:BINUTILS -OutFile "C:\Windows\Temp\binutils-2.45.tar.xz"; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList e, "C:\Windows\Temp\binutils-2.45.tar.xz", `-y, `-oC:\Windows\Temp\ -NoNewWindow -PassThru -Wait; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList x, "C:\Windows\Temp\binutils-2.45.tar", `-y, `-oC:\ -NoNewWindow -PassThru -Wait; `
Remove-Item @('C:\Windows\Temp\*', 'C:\Users\*\Appdata\Local\Temp\*') -Force -Recurse;

RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
Invoke-WebRequest $env:GCC -OutFile "C:\Windows\Temp\gcc-14.2.0.tar.xz"; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList e, "C:\Windows\Temp\gcc-14.2.0.tar.xz", `-y, `-oC:\Windows\Temp\ -NoNewWindow -PassThru -Wait; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList x, "C:\Windows\Temp\gcc-14.2.0.tar", `-y, `-oC:\ -NoNewWindow -PassThru -Wait; `
Invoke-WebRequest $env:GCC -OutFile "C:\Windows\Temp\gcc-15.2.0.tar.xz"; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList e, "C:\Windows\Temp\gcc-15.2.0.tar.xz", `-y, `-oC:\Windows\Temp\ -NoNewWindow -PassThru -Wait; `
Start-Process -FilePath "C:\7-Zip\7z.exe" -ArgumentList x, "C:\Windows\Temp\gcc-15.2.0.tar", `-y, `-oC:\ -NoNewWindow -PassThru -Wait; `
Remove-Item @('C:\Windows\Temp\*', 'C:\Users\*\Appdata\Local\Temp\*') -Force -Recurse;

ENV MSYSTEM MINGW64

RUN C:\msys64\usr\bin\bash.exe -l -c 'cd /c/binutils-2.43 && /c/binutils-2.43/configure --target=mipsel-none-elf --disable-multilib --disable-nls --disable-werror --prefix=/DIST || (cat /BUILD/config.log && exit 1)'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cd /c/binutils-2.45 && /c/binutils-2.45/configure --target=mipsel-none-elf --disable-multilib --disable-nls --disable-werror --prefix=/DIST || (cat /BUILD/config.log && exit 1)'

RUN C:\msys64\usr\bin\bash.exe -l -c 'cd /c/binutils-2.43/libiberty && sed -i s/\\\\buint\\\\b/unsigned/ rust-demangle.c'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cd /c/binutils-2.45/libiberty && sed -i s/\\\\buint\\\\b/unsigned/ rust-demangle.c'

RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/binutils-2.43 all -j8'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/binutils-2.43 install-strip'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cp /c/binutils-2.43/COPYING* /DIST'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/binutils-2.45 all -j8'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/binutils-2.45 install-strip'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cp /c/binutils-2.45/COPYING* /DIST'

RUN C:\msys64\usr\bin\bash.exe -l -c 'mkdir /c/gcc-14.2.0/build && cd /c/gcc-14.2.0/build && ../configure --target=mipsel-none-elf --without-isl --disable-nls --disable-threads --disable-shared --disable-libssp --disable-libstdcxx-pch --disable-libgomp --disable-werror --without-headers --disable-hosted-libstdcxx --with-as=/DIST/bin/mipsel-none-elf-as --with-ld=/DIST/bin/mipsel-none-elf-ld --enable-languages=c,c++ --prefix=/DIST || (cat /BUILD/config.log && exit 1)'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/gcc-14.2.0/build all-gcc -j4'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/gcc-14.2.0/build all-target-libgcc -j4'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/gcc-14.2.0/build all-target-libstdc++-v3 -j4'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/gcc-14.2.0/build install-strip-gcc install-strip-target-libgcc install-strip-target-libstdc++-v3'
RUN C:\msys64\usr\bin\bash.exe -l -c 'mkdir /c/gcc-15.2.0/build && cd /c/gcc-15.2.0/build && ../configure --target=mipsel-none-elf --without-isl --disable-nls --disable-threads --disable-shared --disable-libssp --disable-libstdcxx-pch --disable-libgomp --disable-werror --without-headers --disable-hosted-libstdcxx --with-as=/DIST/bin/mipsel-none-elf-as --with-ld=/DIST/bin/mipsel-none-elf-ld --enable-languages=c,c++ --prefix=/DIST || (cat /BUILD/config.log && exit 1)'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/gcc-15.2.0/build all-gcc -j4'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/gcc-15.2.0/build all-target-libgcc -j4'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/gcc-15.2.0/build all-target-libstdc++-v3 -j4'
RUN C:\msys64\usr\bin\bash.exe -l -c 'make -C /c/gcc-15.2.0/build install-strip-gcc install-strip-target-libgcc install-strip-target-libstdc++-v3'

RUN C:\msys64\usr\bin\bash.exe -l -c 'for t in cat cp echo mkdir rm touch which ; do cp /usr/bin/$t.exe /DIST/bin ; done'
RUN C:\msys64\usr\bin\bash.exe -l -c 'cp /mingw64/bin/mingw32-make.exe /DIST/bin/make.exe'
Expand Down
Loading