-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GCC Compiler Support #1791
base: main
Are you sure you want to change the base?
GCC Compiler Support #1791
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thoughts on bringing mkldscript.c over from OoT (though does require adding the else if for STMT_increment
on lines 40-41) to have parity between the two (mainly looks like just formatting is the difference between the 2). If you don't want to that is fine, I would probably do it after this gets merged.
ENDIAN := -EB | ||
ifeq ($(COMPILER),gcc) | ||
# MIPS options | ||
CFLAGS += -G 0 -march=vr4300 -mtune=vr4300 -mfix4300 -mabi=32 -mno-abicalls -mdivide-breaks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This reminds me, why do we use -mdivide-breaks
? The n64 supports trap instructions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's mostly for compatibility. I think it's a reasonable default that people can change themselves depending on their tolerance for what platforms they want to support
COMMON_DEFINES := $(GBI_DEFINES) | ||
AS_DEFINES := $(COMMON_DEFINES) -DMIPSEB -D_LANGUAGE_ASSEMBLY -D_ULTRA64 | ||
C_DEFINES := $(COMMON_DEFINES) -D_LANGUAGE_C | ||
ENDIAN := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why omit this?
ENDIAN := | |
ENDIAN := -EB |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's an architecture default, it doesn't really need to be explicit. We already rely on -mhard-float
being implicit from the arch
This PR adds support for building the project with a modern MIPS GCC compiler.
Thanks to @fig02 for testing a build on hardware, and everyone who engaged in related discussions.