Remove asm_processor
This commit is contained in:
parent
754e1288ae
commit
82c2885e2f
7
Makefile
7
Makefile
|
@ -447,13 +447,6 @@ ifeq ($(COMPILER), ido)
|
||||||
-Wab,-w \
|
-Wab,-w \
|
||||||
-woff 581,649,819,820,821,838,852 \
|
-woff 581,649,819,820,821,838,852 \
|
||||||
$(MIPSISET) -32
|
$(MIPSISET) -32
|
||||||
|
|
||||||
# Files containing GLOBAL_ASM must be built with the asm_processor
|
|
||||||
ifeq ($(MATCHING), 1)
|
|
||||||
GLOBALASM_C_FILES != grep -rl 'GLOBAL_ASM(' $(C_FILES)
|
|
||||||
GLOBALASM_O_FILES = $(patsubst src/%.c, $(B_DIR)/%.o, $(GLOBALASM_C_FILES))
|
|
||||||
$(GLOBALASM_O_FILES): CC := /usr/bin/env python3 tools/asm_processor/build.py $(CC) -- $(TOOLCHAIN)-as $(ASFLAGS) --
|
|
||||||
endif
|
|
||||||
else ifeq ($(COMPILER), gcc)
|
else ifeq ($(COMPILER), gcc)
|
||||||
CC := $(TOOLCHAIN)-gcc
|
CC := $(TOOLCHAIN)-gcc
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,39 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import shlex
|
|
||||||
import subprocess
|
|
||||||
import tempfile
|
|
||||||
|
|
||||||
dir_path = os.path.dirname(os.path.realpath(__file__))
|
|
||||||
asm_processor = ['python3', os.path.join(dir_path, "asm-processor.py")]
|
|
||||||
prelude = os.path.join(dir_path, "prelude.inc")
|
|
||||||
|
|
||||||
all_args = sys.argv[1:]
|
|
||||||
sep1 = all_args.index('--')
|
|
||||||
sep2 = all_args.index('--', sep1+1)
|
|
||||||
|
|
||||||
compiler = all_args[:sep1]
|
|
||||||
|
|
||||||
assembler = all_args[sep1+1:sep2]
|
|
||||||
assembler_sh = ' '.join(shlex.quote(x) for x in assembler)
|
|
||||||
|
|
||||||
compile_args = all_args[sep2+1:]
|
|
||||||
in_file = compile_args[-1]
|
|
||||||
out_ind = compile_args.index('-o')
|
|
||||||
out_file = compile_args[out_ind + 1]
|
|
||||||
del compile_args[-1]
|
|
||||||
del compile_args[out_ind + 1]
|
|
||||||
del compile_args[out_ind]
|
|
||||||
|
|
||||||
in_dir = os.path.split(os.path.realpath(in_file))[0]
|
|
||||||
opt_flags = [x for x in compile_args if x in ['-g', '-O2', '-O1', '-framepointer']]
|
|
||||||
|
|
||||||
preprocessed_file = tempfile.NamedTemporaryFile(prefix='preprocessed', suffix='.c')
|
|
||||||
|
|
||||||
subprocess.check_call(asm_processor + opt_flags + [in_file], stdout=preprocessed_file)
|
|
||||||
try:
|
|
||||||
subprocess.check_call(compiler + compile_args + ['-I', in_dir, '-o', out_file, preprocessed_file.name])
|
|
||||||
except subprocess.CalledProcessError:
|
|
||||||
exit(1)
|
|
||||||
subprocess.check_call(asm_processor + opt_flags + [in_file, '--post-process', out_file, '--assembler', assembler_sh, '--asm-prelude', prelude])
|
|
|
@ -1,5 +0,0 @@
|
||||||
.set noat
|
|
||||||
.set noreorder
|
|
||||||
.set gp=64
|
|
||||||
.include "macros.inc"
|
|
||||||
|
|
Loading…
Reference in New Issue