Skip to content

Commit 7558927

Browse files
blazewiczdpgeorge
authored andcommitted
all/Makefile: Remove -ansi from GCC flags, its ignored anyway.
The -ansi flag is used for C dialect selection and it is equivalent to -std=c90. Because it goes right before -std=gnu99 it is ignored as for conflicting flags GCC always uses the last one.
1 parent 4a4bb84 commit 7558927

12 files changed

Lines changed: 13 additions & 13 deletions

File tree

bare-arm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ INC += -I..
1313
INC += -I$(BUILD)
1414

1515
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
16-
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
16+
CFLAGS = $(INC) -Wall -Werror -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
1717

1818
#Debugging/Optimization
1919
ifeq ($(DEBUG), 1)

cc3200/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ include ../py/mkenv.mk
2020
CROSS_COMPILE ?= arm-none-eabi-
2121

2222
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -march=armv7e-m -mabi=aapcs -mcpu=cortex-m4 -msoft-float -mfloat-abi=soft -fsingle-precision-constant -Wdouble-promotion
23-
CFLAGS = -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) -Os
23+
CFLAGS = -Wall -Wpointer-arith -Werror -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) -Os
2424
CFLAGS += -g -ffunction-sections -fdata-sections -fno-common -fsigned-char -mno-unaligned-access
2525
CFLAGS += -Iboards/$(BOARD)
2626
CFLAGS += $(CFLAGS_MOD)

esp8266/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ CFLAGS_XTENSA = -fsingle-precision-constant -Wdouble-promotion \
4141
-Wl,-EL -mlongcalls -mtext-section-literals -mforce-l32 \
4242
-DLWIP_OPEN_SRC
4343

44-
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib -DUART_OS=$(UART_OS) \
44+
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -std=gnu99 -nostdlib -DUART_OS=$(UART_OS) \
4545
$(CFLAGS_XTENSA) $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
4646

4747
LDSCRIPT = esp8266.ld

examples/embedding/Makefile.upylib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ INC += -I$(BUILD)
2020
# compiler settings
2121
CWARN = -Wall -Werror
2222
CWARN += -Wpointer-arith -Wuninitialized
23-
CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
23+
CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
2424

2525
# Debugging/Optimization
2626
ifdef DEBUG

minimal/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ ifeq ($(CROSS), 1)
2222
DFU = ../tools/dfu.py
2323
PYDFU = ../tools/pydfu.py
2424
CFLAGS_CORTEX_M4 = -mthumb -mtune=cortex-m4 -mabi=aapcs-linux -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -fsingle-precision-constant -Wdouble-promotion
25-
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
25+
CFLAGS = $(INC) -Wall -Werror -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
2626
else
27-
CFLAGS = -m32 $(INC) -Wall -Werror -ansi -std=gnu99 $(COPT)
27+
CFLAGS = -m32 $(INC) -Wall -Werror -std=gnu99 $(COPT)
2828
endif
2929

3030
#Debugging/Optimization

mpy-cross/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ INC += -I$(BUILD)
1919
# compiler settings
2020
CWARN = -Wall -Werror
2121
CWARN += -Wpointer-arith -Wuninitialized
22-
CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
22+
CFLAGS = $(INC) $(CWARN) -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
2323
CFLAGS += -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables
2424

2525
# Debugging/Optimization

pic16bit/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ INC += -I$(XC16)/include
2121
INC += -I$(XC16)/support/$(PARTFAMILY)/h
2222

2323
CFLAGS_PIC16BIT = -mcpu=$(PART) -mlarge-code
24-
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_PIC16BIT) $(COPT)
24+
CFLAGS = $(INC) -Wall -Werror -std=gnu99 -nostdlib $(CFLAGS_PIC16BIT) $(COPT)
2525

2626
#Debugging/Optimization
2727
ifeq ($(DEBUG), 1)

qemu-arm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ INC += -I$(BUILD)
1515
INC += -I../tools/tinytest/
1616

1717
CFLAGS_CORTEX_M3 = -mthumb -mcpu=cortex-m3 -mfloat-abi=soft
18-
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M3) $(COPT) \
18+
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -std=gnu99 $(CFLAGS_CORTEX_M3) $(COPT) \
1919
-ffunction-sections -fdata-sections
2020

2121
#Debugging/Optimization

stmhal/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ CFLAGS_MCU_f4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES
5656
CFLAGS_MCU_f7 = $(CFLAGS_CORTEX_M) -mtune=cortex-m7 -mcpu=cortex-m7 -DMCU_SERIES_F7
5757
CFLAGS_MCU_l4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES_L4
5858

59-
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD)
59+
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -std=gnu99 -nostdlib $(CFLAGS_MOD)
6060
CFLAGS += -D$(CMSIS_MCU)
6161
CFLAGS += $(CFLAGS_MCU_$(MCU_SERIES))
6262
CFLAGS += $(COPT)

teensy/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ INC += -I../lib/mp-readline
3636
INC += -I$(BUILD)
3737
INC += -Icore
3838

39-
CFLAGS = $(INC) -Wall -Wpointer-arith -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4)
39+
CFLAGS = $(INC) -Wall -Wpointer-arith -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4)
4040
LDFLAGS = -nostdlib -T mk20dx256.ld -msoft-float -mfloat-abi=soft
4141

4242
ifeq ($(USE_ARDUINO_TOOLCHAIN),1)

0 commit comments

Comments
 (0)