mirror of https://github.com/zeldaret/mm.git
Use `gcc -E` for `cpp` (#1639)
* Fix cpp for macs? * Add comment * Move cppflags with cpp
This commit is contained in:
parent
b7e5468ca1
commit
659e2b5088
12
Makefile
12
Makefile
|
@ -87,12 +87,6 @@ BASEROM_DIR := baseroms/$(VERSION)
|
|||
BUILD_DIR := build/$(VERSION)
|
||||
EXTRACTED_DIR := extracted/$(VERSION)
|
||||
|
||||
CPPFLAGS += -P
|
||||
|
||||
ifeq ($(DETECTED_OS), macos)
|
||||
CPPFLAGS += -xc++
|
||||
endif
|
||||
|
||||
|
||||
#### Tools ####
|
||||
ifneq ($(shell type $(MIPS_BINUTILS_PREFIX)ld >/dev/null 2>/dev/null; echo $$?), 0)
|
||||
|
@ -143,7 +137,11 @@ ifeq ($(RUN_CC_CHECK),0)
|
|||
CC_CHECK_COMP := @:
|
||||
endif
|
||||
|
||||
CPP := cpp
|
||||
# The `cpp` command behaves differently on macOS (it behaves as if
|
||||
# `-traditional-cpp` was passed) so we use `gcc -E` instead.
|
||||
CPP := gcc -E
|
||||
CPPFLAGS += -P -xc -fno-dollars-in-identifiers
|
||||
|
||||
MKLDSCRIPT := tools/buildtools/mkldscript
|
||||
MKDMADATA := tools/buildtools/mkdmadata
|
||||
ZAPD := tools/ZAPD/ZAPD.out
|
||||
|
|
|
@ -1097,10 +1097,10 @@ def find_symbols_in_rodata(section):
|
|||
def asm_header(section_name: str):
|
||||
return f""".include "macro.inc"
|
||||
|
||||
# assembler directives
|
||||
.set noat # allow manual use of $at
|
||||
.set noreorder # don't insert nops after branches
|
||||
.set gp=64 # allow use of 64-bit general purpose registers
|
||||
/* assembler directives */
|
||||
.set noat /* allow manual use of $at */
|
||||
.set noreorder /* don't insert nops after branches */
|
||||
.set gp=64 /* allow use of 64-bit general purpose registers */
|
||||
|
||||
.section {section_name}
|
||||
|
||||
|
|
Loading…
Reference in New Issue