diff options
| author | Jerzy Kasenberg <[email protected]> | 2021-12-26 22:19:07 +0100 |
|---|---|---|
| committer | Jerzy Kasenberg <[email protected]> | 2021-12-27 10:11:56 +0100 |
| commit | 5c5ecea6f17aae16808533aa248671069cdc5fa5 (patch) | |
| tree | e79192ab522d229069d5630e585adf81fbe3bebf /examples/make.mk | |
| parent | a6789b5d5a3c9e41771e5eb8fdb08182c95fbe08 (diff) | |
build system: Changes for xc32 compiler
Three changes are needed to accommodate xc32 compiler build:
- optimized build flag other than -Os
added CFLAGS_OPTIMIZED that defaults to -Os but can be overridden in boards
- build without -lnosys
added LIBS_GCC with default libraries that can be changed in boards
- build without LD_FILE specification
if LD_FILE is empty -Wl,-T options is not added to LDFLAGS
Diffstat (limited to 'examples/make.mk')
| -rw-r--r-- | examples/make.mk | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/make.mk b/examples/make.mk index 793c40aa2..bed46d02b 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -54,6 +54,8 @@ endif #-------------- Cross Compiler ------------ # Can be set by board, default to ARM GCC CROSS_COMPILE ?= arm-none-eabi- +# Allow for -Os to be changed by board makefiles in case -Os is not allowed +CFLAGS_OPTIMIZED ?= -Os CC = $(CROSS_COMPILE)gcc CXX = $(CROSS_COMPILE)g++ @@ -112,7 +114,7 @@ CFLAGS += \ ifeq ($(DEBUG), 1) CFLAGS += -Og else - CFLAGS += -Os + CFLAGS += $(CFLAGS_OPTIMIZED) endif # Log level is mapped to TUSB DEBUG option |
