summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAetias <aetias@outlook.com>2024-04-30 15:09:04 +0200
committerAetias <aetias@outlook.com>2024-04-30 15:09:04 +0200
commit780b65b7a60007783fb20ee3fb27153877e00550 (patch)
tree69f241cb252fe441b7b50ae82be399759842f32f /tools
parent2e33294f89b37c8824ee97e8fd3cd675850d743d (diff)
Update compiler flags in `mangle.py`
Diffstat (limited to 'tools')
-rw-r--r--tools/mangle.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/tools/mangle.py b/tools/mangle.py
index 50bf9538..a9bfcadf 100644
--- a/tools/mangle.py
+++ b/tools/mangle.py
@@ -12,6 +12,9 @@ tools_dir = Path(os.path.dirname(os.path.realpath(__file__)))
cc_path = tools_dir / 'mwccarm' / '2.0' / 'sp1p5' / 'mwccarm.exe'
root_dir = tools_dir.parent
include_dir = root_dir / 'include'
+libs_dir = root_dir / 'libs'
+libc_include_dir = libs_dir / 'c' / 'include'
+libcpp_include_dir = libs_dir / 'cpp' / 'include'
if platform.system() == 'Windows': cc = [str(cc_path)]
else: cc = ['wine', str(cc_path)]
@@ -19,13 +22,22 @@ else: cc = ['wine', str(cc_path)]
args = parser.parse_args()
cc.extend([
- '-nolink',
+ '-enum', 'int',
+ '-char', 'signed',
'-proc', 'arm946e',
+ '-gccext,on',
+ '-fp', 'soft',
+ '-inline', 'on,noauto',
+ '-Cpp_exceptions', 'off',
+ '-RTTI', 'off',
'-interworking',
- '-char', 'signed',
+ '-nolink',
'-msgstyle', 'gcc',
'-dis',
- f'-I{include_dir}',
+ '-gccinc',
+ '-i', include_dir,
+ '-i', libc_include_dir,
+ '-i', libcpp_include_dir,
'-DSTUBS',
args.file
])