diff --git a/flight/Bootloaders/BootloaderUpdater/Makefile b/flight/Bootloaders/BootloaderUpdater/Makefile index 81aa163ec..aabfc88bf 100644 --- a/flight/Bootloaders/BootloaderUpdater/Makefile +++ b/flight/Bootloaders/BootloaderUpdater/Makefile @@ -258,7 +258,9 @@ CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -I. CFLAGS += -mapcs-frame CFLAGS += -fomit-frame-pointer +ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices +endif CFLAGS += -Wall CFLAGS += -Werror diff --git a/flight/Bootloaders/CopterControl/Makefile b/flight/Bootloaders/CopterControl/Makefile index fe613f909..99521020d 100644 --- a/flight/Bootloaders/CopterControl/Makefile +++ b/flight/Bootloaders/CopterControl/Makefile @@ -300,7 +300,9 @@ CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -I. CFLAGS += -mapcs-frame CFLAGS += -fomit-frame-pointer +ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices +endif CFLAGS += -Wall CFLAGS += -Werror diff --git a/flight/Bootloaders/OpenPilot/Makefile b/flight/Bootloaders/OpenPilot/Makefile index e4285f7e0..cad11dedf 100644 --- a/flight/Bootloaders/OpenPilot/Makefile +++ b/flight/Bootloaders/OpenPilot/Makefile @@ -306,7 +306,9 @@ CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -I. CFLAGS += -mapcs-frame CFLAGS += -fomit-frame-pointer +ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices +endif CFLAGS += -Wall CFLAGS += -Werror diff --git a/flight/Bootloaders/PipXtreme/Makefile b/flight/Bootloaders/PipXtreme/Makefile index 64f13d0d2..19b651a5f 100644 --- a/flight/Bootloaders/PipXtreme/Makefile +++ b/flight/Bootloaders/PipXtreme/Makefile @@ -301,7 +301,9 @@ CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -I. CFLAGS += -mapcs-frame CFLAGS += -fomit-frame-pointer +ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices +endif CFLAGS += -Wall CFLAGS += -Werror diff --git a/flight/CopterControl/Makefile b/flight/CopterControl/Makefile index ea6cab01c..d36c48fca 100644 --- a/flight/CopterControl/Makefile +++ b/flight/CopterControl/Makefile @@ -443,7 +443,9 @@ CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) -I. CFLAGS += -mapcs-frame CFLAGS += -fomit-frame-pointer +ifeq ($(CODE_SOURCERY), YES) CFLAGS += -fpromote-loop-indices +endif CFLAGS += -Wall CFLAGS += -Werror