diff options
author | Max <mparisi@stevens.edu> | 2020-12-19 12:39:50 -0500 |
---|---|---|
committer | Max <mparisi@stevens.edu> | 2020-12-19 12:39:50 -0500 |
commit | 4f3e87d037cfc6efcafc605e309edc71179cbb7a (patch) | |
tree | 5036da5a71c08c37e2c9d674a06f6699e69d8e2f | |
parent | 128935015a3fd7f53404315c268c3d2424af4dc7 (diff) |
argument parsing issue in pragma.py when compiler is invoked through wine
-rw-r--r-- | Makefile | 10 | ||||
-rw-r--r-- | tools/pragma/pragma.py | 3 |
2 files changed, 7 insertions, 6 deletions
@@ -10,7 +10,7 @@ EXE := .exe WINE := else EXE := -WINE := wine +WINE := wine endif ifeq ($(NOWINE),1) @@ -77,8 +77,8 @@ MWCC_VERSION := 3.0 AS := $(DEVKITPPC)/bin/powerpc-eabi-as OBJCOPY := $(DEVKITPPC)/bin/powerpc-eabi-objcopy CPP := cpp -P -CC := $(WINE) tools/mwcc_compiler/GC/$(MWCC_VERSION)/mwcceppc.exe -LD := $(WINE) tools/mwcc_compiler/GC/$(MWCC_VERSION)/mwldeppc.exe +CC := $(WINE)tools/mwcc_compiler/GC/$(MWCC_VERSION)/mwcceppc.exe +LD := $(WINE)tools/mwcc_compiler/GC/$(MWCC_VERSION)/mwldeppc.exe ELF2DOL := tools/elf2dol/elf2dol$(EXE) SHA1SUM := sha1sum PYTHON := python3 @@ -155,7 +155,7 @@ $(BUILD_DIR)/%.o: %.s $(PYTHON) $(POSTPROC) $(PROCFLAGS) $@ $(BUILD_DIR)/%.o: %.cpp - $(PYTHON) $(PRAGMAPROC) $(CC) "$(CFLAGS) -lang c++ -c" $@ $< -fix-regswaps + $(PYTHON) $(PRAGMAPROC) "$(CC)" "$(CFLAGS) -lang c++ -c" $@ $< -fix-regswaps $(BUILD_DIR)/%.o: %.c - $(PYTHON) $(PRAGMAPROC) $(CC) "$(CFLAGS) -lang c99 -c" $@ $< -fix-regswaps + $(PYTHON) $(PRAGMAPROC) "$(CC)" "$(CFLAGS) -lang c99 -c" $@ $< -fix-regswaps diff --git a/tools/pragma/pragma.py b/tools/pragma/pragma.py index f721c65..8550a9f 100644 --- a/tools/pragma/pragma.py +++ b/tools/pragma/pragma.py @@ -246,7 +246,8 @@ with open(args.source, "r") as src: if not (start >= start_file and end > start): raise ValueError("Invalid start, end, or start_file arguments (end must be > start, and start >= start_file)") regswap_tasks.append(RegswapTask(start-start_file, end-start_file, regA, regB)) - subprocess.run([args.cc, *args.cflags.split(' '), "-o", args.output, args.source]) + print(*args.cc.split(' ')) + subprocess.run([*args.cc.split(' '), *args.cflags.split(' '), "-o", args.output, args.source]) instrs = [] TEXT_INDEX = 1 # NOTE: assumes that mwcceppc always places the .text section header at index 1 |