diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index db36a5c68..0227a4478 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,7 +20,7 @@ jobs: run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Build run: | - python configure.py -m -v ${{matrix.version}} --compilers /compilers/GC --powerpc /opt/devkitpro/devkitPPC/bin + python configure.py -m -v ${{matrix.version}} --compilers /compilers/GC ninja - name: Upload progress if: github.ref == 'refs/heads/main' @@ -50,4 +50,6 @@ jobs: - name: Git config run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Build - run: make -j$(nproc) MAPGENFLAG=1 VERSION=${{matrix.version}} COMPILERS=/compilers/GC POWERPC=/opt/devkitpro/devkitPPC/bin + run: | + python configure.py --map --compilers /compilers/GC + make -j$(nproc) MAPGENFLAG=1 VERSION=${{matrix.version}} COMPILERS=/compilers/GC diff --git a/Makefile b/Makefile index aacb7921c..e14211b28 100644 --- a/Makefile +++ b/Makefile @@ -95,7 +95,12 @@ else endif # Disable wine debug output for cleanliness export WINEDEBUG ?= -all - AS := $(POWERPC)/powerpc-eabi-as + # The Linux dkp files don't have the powerpc-eabi prefix + ifeq ($(shell uname -s), Darwin) + AS := $(POWERPC)/powerpc-eabi-as + else + AS := $(POWERPC)/as + endif PYTHON := python3 endif COMPILERS ?= tools/mwcc_compiler diff --git a/configure.py b/configure.py index 7e1bd5725..3d98cac5b 100755 --- a/configure.py +++ b/configure.py @@ -1885,6 +1885,10 @@ def main(): mwld = compiler_path / "mwldeppc.exe" gnu_as = args.powerpc / f"powerpc-eabi-as{exe}" + #The dkp files for Linux don't have the powerpc-eabi prefix. + if os.uname().sysname == "Linux": + gnu_as = args.powerpc / f"as" + mwcc_cmd = f"{chain}{wine}{mwcc} $cflags -MMD -c $in -o $basedir" if args.context: mwcc_cmd += " && $python tools/decompctx.py $cfile -r -q" diff --git a/tools/download_ppc.py b/tools/download_ppc.py index 41fb23037..66601dbe3 100644 --- a/tools/download_ppc.py +++ b/tools/download_ppc.py @@ -39,8 +39,13 @@ def main() -> None: with zipfile.ZipFile(tmp_zip) as zip_file: zip_file.extractall(output) - st = os.stat(output) - os.chmod(output, st.st_mode | stat.S_IEXEC) + #st = os.stat(output) + #os.chmod(output, st.st_mode | stat.S_IEXEC) + #FIXME: the above doesn't work for whatever reason + for filename in os.listdir(output): + f = os.path.join(output, filename) + st = os.stat(f) + os.chmod(f, st.st_mode | stat.S_IEXEC) if __name__ == "__main__":