mirror of
https://github.com/pmret/papermario.git
synced 2024-09-16 14:32:37 +02:00
Modern GCC improvements (#1139)
* enable gcc_modern color * add capability to compile segments with gcc_modern * macos: install modern gcc
This commit is contained in:
parent
262428c68a
commit
6741e3f848
@ -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
|
||||
|
||||
|
@ -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":
|
||||
|
Loading…
Reference in New Issue
Block a user