Skip to content

Commit

Permalink
FIXUPS -> MODERN_LD
Browse files Browse the repository at this point in the history
  • Loading branch information
hensldm committed Aug 22, 2024
1 parent 1616482 commit af25e73
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
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`.

0 comments on commit af25e73

Please sign in to comment.