diff --git a/install_deps.sh b/install_deps.sh index e279e34658..f58dfa4955 100755 --- a/install_deps.sh +++ b/install_deps.sh @@ -20,7 +20,7 @@ if [[ "$uname" == "Darwin" ]]; then fi # Install packages - brew install md5sha1sum ninja gcc nanaian/brew/mips-linux-gnu-binutils || exit 1 + brew install md5sha1sum ninja gcc nanaian/brew/mips-linux-gnu-binutils nanaian/brew/mips-linux-gnu-gcc || exit 1 python3 -m pip install -U -r requirements.txt || exit 1 cp tools/precommit_check_no_assets.sh "$(git rev-parse --git-path hooks)/pre-commit" || exit 1 diff --git a/tools/build/configure.py b/tools/build/configure.py index f3888ae0d5..7d1f6a16b7 100755 --- a/tools/build/configure.py +++ b/tools/build/configure.py @@ -75,7 +75,7 @@ def write_ninja_rules( cflags = f"-c -G0 -O2 -gdwarf-2 -x c -B {BUILD_TOOLS}/cc/gcc/ {extra_cflags}" - cflags_modern = f"-c -G0 -O2 -gdwarf-2 -fno-builtin-bcopy -fno-tree-loop-distribute-patterns -funsigned-char -mgp32 -mfp32 -mabi=32 -mfix4300 -march=vr4300 -mno-gpopt -fno-toplevel-reorder -mno-abicalls -fno-pic -fno-exceptions -fno-stack-protector -fno-zero-initialized-in-bss -Wno-builtin-declaration-mismatch -x c {extra_cflags}" + cflags_modern = f"-c -G0 -O2 -gdwarf-2 -fdiagnostics-color=always -fno-builtin-bcopy -fno-tree-loop-distribute-patterns -funsigned-char -mgp32 -mfp32 -mabi=32 -mfix4300 -march=vr4300 -mno-gpopt -fno-toplevel-reorder -mno-abicalls -fno-pic -fno-exceptions -fno-stack-protector -fno-zero-initialized-in-bss -Wno-builtin-declaration-mismatch -x c {extra_cflags}" cflags_272 = f"-c -G0 -mgp32 -mfp32 -mips3 {extra_cflags}" cflags_272 = cflags_272.replace("-ggdb3", "-g1") @@ -146,7 +146,7 @@ def write_ninja_rules( ninja.rule( "cc_modern", - description="gcc $in", + description="gcc_modern $in", command=f"bash -o pipefail -c '{cpp} {CPPFLAGS} {extra_cppflags} $cppflags -MD -MF $out.d $in -o - | $iconv | {ccache}{cc_modern} {cflags_modern} $cflags - -o $out'", depfile="$out.d", deps="gcc", @@ -672,6 +672,9 @@ class Configure: elif "egcs" in cflags: task = "cc_egcs" cflags = cflags.replace("egcs", "") + elif "gcc_modern" in cflags: + task = "cc_modern" + cflags = cflags.replace("gcc_modern", "") encoding = "CP932" # similar to SHIFT-JIS, but includes backslash and tilde if version == "ique":