mirror of
https://github.com/decompme/decomp.me.git
synced 2026-02-21 13:59:25 -06:00
Add custom-built cc1 for SN64 (#569)
* Add custom-built cc1 for SN64 * Update flags * Fix to use old cpp Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com> Co-authored-by: Mr-Wiseguy <mrwiseguyromhacking@gmail.com>
This commit is contained in:
@@ -406,16 +406,15 @@ def download_n64():
|
||||
print(f"{dest} already exists, skipping")
|
||||
else:
|
||||
dest.mkdir()
|
||||
download_tar(
|
||||
url="https://github.com/decompals/SN64-gcc/releases/download/gcc-2.7.2-970404/SN64-gcc-2.7.2-970404-linux.tar.gz",
|
||||
dest_name="gcc2.7.2snew",
|
||||
)
|
||||
download_file(
|
||||
url="https://github.com/RocketRet/modern-asn64/releases/download/main-release/modern-asn64.py",
|
||||
log_name="modern-asn64.py",
|
||||
dest_path=dest / "modern-asn64.py",
|
||||
)
|
||||
download_file(
|
||||
url="https://github.com/Mr-Wiseguy/pcsx-redux/releases/download/n64/cc1n64.exe",
|
||||
log_name="cc1n64.exe",
|
||||
dest_path=dest / "cc1n64.exe",
|
||||
)
|
||||
|
||||
# SN
|
||||
dest = COMPILERS_DIR / "gcc2.8.1sn"
|
||||
|
||||
@@ -317,7 +317,7 @@ GCC272SN = GCCCompiler(
|
||||
GCC272SNEW = GCCCompiler(
|
||||
id="gcc2.7.2snew",
|
||||
platform=N64,
|
||||
cc='cpp -P "$INPUT" | ${WINE} "${COMPILER_DIR}"/cc1n64.exe -quiet -G0 -mcpu=vr4300 -mips3 -mhard-float -meb ${COMPILER_FLAGS} -o "$OUTPUT".s && python3 "${COMPILER_DIR}"/modern-asn64.py mips-linux-gnu-as "$OUTPUT".s -G 0 -EB -mips3 -O1 -mabi=32 -mgp32 -march=vr4300 -mfp32 -mno-shared -o "$OUTPUT"',
|
||||
cc='"${COMPILER_DIR}"/cpp -lang-c -undef "$INPUT" | "${COMPILER_DIR}"/cc1 -mfp32 -mgp32 -G0 -quiet -mcpu=vr4300 -fno-exceptions ${COMPILER_FLAGS} -o "$OUTPUT".s && python3 "${COMPILER_DIR}"/modern-asn64.py mips-linux-gnu-as "$OUTPUT".s -G0 -EB -mips3 -O1 -mabi=32 -mgp32 -march=vr4300 -mfp32 -mno-shared -o "$OUTPUT"',
|
||||
)
|
||||
|
||||
GCC281SNCXX = GCCCompiler(
|
||||
@@ -848,7 +848,7 @@ _all_presets = [
|
||||
Preset(
|
||||
"Rocket Robot on Wheels",
|
||||
GCC272SNEW,
|
||||
"-O2 -g",
|
||||
"-mips2 -O2 -gdwarf -funsigned-char",
|
||||
diff_flags=["-Mreg-names=32"],
|
||||
),
|
||||
Preset(
|
||||
|
||||
@@ -69,7 +69,9 @@ COMMON_CLANG_FLAGS: Flags = [
|
||||
|
||||
COMMON_GCC_FLAGS: Flags = [
|
||||
FlagSet(id="gcc_opt_level", flags=["-O0", "-O1", "-O2", "-O3"]),
|
||||
FlagSet(id="gcc_debug_level", flags=["-gdwarf-2", "-g0", "-g1", "-g2", "-g3"]),
|
||||
FlagSet(
|
||||
id="gcc_debug_level", flags=["-gdwarf-2", "-gdwarf", "-g0", "-g1", "-g2", "-g3"]
|
||||
),
|
||||
FlagSet(id="gcc_char_type", flags=["-fsigned-char", "-funsigned-char"]),
|
||||
Checkbox("gcc_force_addr", "-fforce-addr"),
|
||||
]
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
"gcc_debug_level.-g1": "Minimal trace info",
|
||||
"gcc_debug_level.-g2": "Local variable tracking",
|
||||
"gcc_debug_level.-g3": "Macro expansions",
|
||||
"gcc_debug_level.-gdwarf": "DWARF debug info (for SN64, should not affect codegen)",
|
||||
"gcc_debug_level.-gdwarf-2": "DWARF 2 debug info (should not affect codegen)",
|
||||
"gcc_force_addr": "Force memory address constants to be copied into registers before doing arithmetic on them",
|
||||
|
||||
|
||||
Reference in New Issue
Block a user