Merge pull request #1654 from Kurausukun/better_dinfo

Don't Build Modern with -g by Default
This commit is contained in:
GriffinR 2022-05-12 22:41:15 -04:00 committed by GitHub
commit ed1cc203c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 10 deletions

View file

@ -451,13 +451,6 @@ Replace `<output of nproc>` with the number that the `nproc` command returned.
`nproc` is not available on macOS. The alternative is `sysctl -n hw.ncpu` ([relevant Stack Overflow thread](https://stackoverflow.com/questions/1715580)). `nproc` is not available on macOS. The alternative is `sysctl -n hw.ncpu` ([relevant Stack Overflow thread](https://stackoverflow.com/questions/1715580)).
## Debug info
To build **pokeemerald.elf** with enhanced debug info:
```bash
make DINFO=1
```
## devkitARM's C compiler ## devkitARM's C compiler
This project supports the `arm-none-eabi-gcc` compiler included with devkitARM. If devkitARM (a.k.a. gba-dev) has already been installed as part of the platform-specific instructions, simply run: This project supports the `arm-none-eabi-gcc` compiler included with devkitARM. If devkitARM (a.k.a. gba-dev) has already been installed as part of the platform-specific instructions, simply run:
@ -534,7 +527,7 @@ devkitARM is now installed.
devkitARM is now installed. devkitARM is now installed.
## Installing devkitARM on Arch Linux ### Installing devkitARM on Arch Linux
1. Follow [devkitPro's instructions](https://devkitpro.org/wiki/devkitPro_pacman#Customising_Existing_Pacman_Install) to configure `pacman` to download devkitPro packages. 1. Follow [devkitPro's instructions](https://devkitpro.org/wiki/devkitPro_pacman#Customising_Existing_Pacman_Install) to configure `pacman` to download devkitPro packages.
2. Install `gba-dev`: run the following command as root. 2. Install `gba-dev`: run the following command as root.
@ -552,7 +545,7 @@ devkitARM is now installed.
devkitARM is now installed. devkitARM is now installed.
## Other toolchains ### Other toolchains
To build using a toolchain other than devkitARM, override the `TOOLCHAIN` environment variable with the path to your toolchain, which must contain the subdirectory `bin`. To build using a toolchain other than devkitARM, override the `TOOLCHAIN` environment variable with the path to your toolchain, which must contain the subdirectory `bin`.
```bash ```bash
@ -564,6 +557,14 @@ make TOOLCHAIN="/usr/local/arm-none-eabi"
``` ```
To compile the `modern` target with this toolchain, the subdirectories `lib`, `include`, and `arm-none-eabi` must also be present. To compile the `modern` target with this toolchain, the subdirectories `lib`, `include`, and `arm-none-eabi` must also be present.
### Building with debug info under a modern toolchain
To build **pokeemerald.elf** with debug symbols under a modern toolchain:
```bash
make modern DINFO=1
```
Note that this is not necessary for a non-modern build since those are built with debug symbols by default.
# Useful additional tools # Useful additional tools
* [porymap](https://github.com/huderlem/porymap) for viewing and editing maps * [porymap](https://github.com/huderlem/porymap) for viewing and editing maps

View file

@ -107,7 +107,7 @@ LIBPATH := -L ../../tools/agbcc/lib
LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall LIB := $(LIBPATH) -lgcc -lc -L../../libagbsyscall -lagbsyscall
else else
CC1 = $(shell $(PATH_MODERNCC) --print-prog-name=cc1) -quiet CC1 = $(shell $(PATH_MODERNCC) --print-prog-name=cc1) -quiet
override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast -g override CFLAGS += -mthumb -mthumb-interwork -O2 -mabi=apcs-gnu -mtune=arm7tdmi -march=armv4t -fno-toplevel-reorder -Wno-pointer-to-int-cast
ROM := $(MODERN_ROM_NAME) ROM := $(MODERN_ROM_NAME)
OBJ_DIR := $(MODERN_OBJ_DIR_NAME) OBJ_DIR := $(MODERN_OBJ_DIR_NAME)
LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libc.a))" LIBPATH := -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libgcc.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libnosys.a))" -L "$(dir $(shell $(PATH_MODERNCC) -mthumb -print-file-name=libc.a))"