Skip to content
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

FIXUPS -> MODERN_LD #92

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
COMPARE ?= 1
FIXUPS ?= 0
MODERN_LD ?= 0
MODERN_GCC ?= 0

ifneq ($(FIXUPS),0)
ifneq ($(MODERN_LD),0)
COMPARE := 0
endif

Expand All @@ -24,7 +24,7 @@ endif
ifneq ($(MODERN_GCC),0)
COMPILER := modern_gcc
COMPARE := 0
FIXUPS := 0
MODERN_LD := 0
endif

BASE_DIR := extracted/$(VERSION)/$(TARGET)
Expand Down Expand Up @@ -188,7 +188,7 @@ ifneq ($(COMPARE),0)
echo "Object file $(@F:.marker=.o) is not in the current archive" \
)
endif
ifneq ($(FIXUPS),0)
ifneq ($(MODERN_LD),0)
tools/set_o32abi_bit.py $(WORKING_DIR)/$(@:.marker=.o)
$(CROSS)strip $(WORKING_DIR)/$(@:.marker=.o) -N asdasdasdasd
$(CROSS)objcopy --remove-section .mdebug $(WORKING_DIR)/$(@:.marker=.o)
Expand All @@ -207,7 +207,7 @@ ifneq ($(COMPARE),0)
echo "Object file $(@F:.marker=.o) is not in the current archive" \
)
endif
ifneq ($(FIXUPS),0)
ifneq ($(MODERN_LD),0)
tools/set_o32abi_bit.py $(WORKING_DIR)/$(@:.marker=.o)
$(CROSS)strip $(WORKING_DIR)/$(@:.marker=.o) -N asdasdasdasd
$(CROSS)objcopy --remove-section .mdebug $(WORKING_DIR)/$(@:.marker=.o)
Expand All @@ -230,7 +230,7 @@ ifneq ($(COMPARE),0)
echo "Object file $(@F:.marker=.o) is not in the current archive" \
)
endif
ifneq ($(FIXUPS),0)
ifneq ($(MODERN_LD),0)
tools/set_o32abi_bit.py $(WORKING_DIR)/$(@:.marker=.o)
$(CROSS)strip $(WORKING_DIR)/$(@:.marker=.o) -N asdasdasdasd
$(CROSS)objcopy --remove-section .mdebug $(WORKING_DIR)/$(@:.marker=.o)
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ If building without an target archive, than you can use `COMPARE=0` like the the
note that running setup without `COMPARE=0` and no archive will result in an error,
and only needs to be run once instead of per target flag combination

If building for use with modern linkers, than you can use `FIXUPS=1` like the the following:
If building for use with modern linkers, than you can use `MODERN_LD=1` like the following:

- `make VERSION=L TARGET=libgultra_rom FIXUPS=1 setup`
- `make VERSION=L TARGET=libgultra_rom FIXUPS=1`
- `make VERSION=L TARGET=libgultra_rom MODERN_LD=1 setup`
- `make VERSION=L TARGET=libgultra_rom MODERN_LD=1`

note that running with `FIXUPS=1` will automatically set `COMPARE=0`.
note that running with `MODERN_LD=1` will automatically set `COMPARE=0`.

It is also possible to build archives using modern gcc by using `MODERN_GCC=1` like the following:

- `make VERSION=L TARGET=libgultra_rom MODERN_GCC=1`

note that running with `MODERN_GCC=1` will automatically set `COMPARE=0` and `FIXUPS=0`.
note that running with `MODERN_GCC=1` will automatically set `COMPARE=0` and `MODERN_LD=0`.
Loading