Skip to content

Commit

Permalink
Adds a feature to compile targets in a deterministic way.
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsracz committed Dec 12, 2020
1 parent e1a5c7d commit c9749ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions etc/bare.armv7m.mk
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ ARCHOPTIMIZATION += -O3 -fno-strict-aliasing -fno-strength-reduce -fomit-frame-p

ARCHFLAGS = -g -MD -MP -march=armv7-m -mthumb -mfloat-abi=soft

ifdef DETERMINISTIC_COMPILATION
ARCHFLAGS += -frandom-seed=$(shell echo $(abspath $<) | md5sum | sed 's/\(.*\) .*/\1/')
endif

ASFLAGS = -c $(ARCHFLAGS)

CORECFLAGS = $(ARCHFLAGS) -Wall -Werror -Wno-unknown-pragmas \
Expand Down
4 changes: 4 additions & 0 deletions etc/freertos.armv7m.mk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ ARCHOPTIMIZATION += -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-p

ARCHFLAGS = -g -MD -MP -mcpu=cortex-m3 -mthumb -mfloat-abi=soft

ifdef DETERMINISTIC_COMPILATION
ARCHFLAGS += -frandom-seed=$(shell echo $(abspath $<) | md5sum | sed 's/\(.*\) .*/\1/')
endif

ifdef DEBUG_MEMORY_USE
#warning: -funwind-tables adds 10k code size. Needed for malloc debugging.
ARCHFLAGS += -funwind-tables
Expand Down

0 comments on commit c9749ed

Please sign in to comment.