mirror of
https://github.com/licsber/micropython.git
synced 2024-09-20 09:00:23 +08:00
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.
This commit is contained in:
parent
4a4bb84e92
commit
75589272ef
@ -13,7 +13,7 @@ INC += -I..
|
|||||||
INC += -I$(BUILD)
|
INC += -I$(BUILD)
|
||||||
|
|
||||||
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
|
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
|
||||||
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
|
CFLAGS = $(INC) -Wall -Werror -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
|
||||||
|
|
||||||
#Debugging/Optimization
|
#Debugging/Optimization
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
|
@ -20,7 +20,7 @@ include ../py/mkenv.mk
|
|||||||
CROSS_COMPILE ?= arm-none-eabi-
|
CROSS_COMPILE ?= arm-none-eabi-
|
||||||
|
|
||||||
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
|
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
|
||||||
CFLAGS = -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) -Os
|
CFLAGS = -Wall -Wpointer-arith -Werror -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) -Os
|
||||||
CFLAGS += -g -ffunction-sections -fdata-sections -fno-common -fsigned-char -mno-unaligned-access
|
CFLAGS += -g -ffunction-sections -fdata-sections -fno-common -fsigned-char -mno-unaligned-access
|
||||||
CFLAGS += -Iboards/$(BOARD)
|
CFLAGS += -Iboards/$(BOARD)
|
||||||
CFLAGS += $(CFLAGS_MOD)
|
CFLAGS += $(CFLAGS_MOD)
|
||||||
|
@ -41,7 +41,7 @@ CFLAGS_XTENSA = -fsingle-precision-constant -Wdouble-promotion \
|
|||||||
-Wl,-EL -mlongcalls -mtext-section-literals -mforce-l32 \
|
-Wl,-EL -mlongcalls -mtext-section-literals -mforce-l32 \
|
||||||
-DLWIP_OPEN_SRC
|
-DLWIP_OPEN_SRC
|
||||||
|
|
||||||
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib -DUART_OS=$(UART_OS) \
|
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -std=gnu99 -nostdlib -DUART_OS=$(UART_OS) \
|
||||||
$(CFLAGS_XTENSA) $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
|
$(CFLAGS_XTENSA) $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
|
||||||
|
|
||||||
LDSCRIPT = esp8266.ld
|
LDSCRIPT = esp8266.ld
|
||||||
|
@ -20,7 +20,7 @@ INC += -I$(BUILD)
|
|||||||
# compiler settings
|
# compiler settings
|
||||||
CWARN = -Wall -Werror
|
CWARN = -Wall -Werror
|
||||||
CWARN += -Wpointer-arith -Wuninitialized
|
CWARN += -Wpointer-arith -Wuninitialized
|
||||||
CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
|
CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
|
||||||
|
|
||||||
# Debugging/Optimization
|
# Debugging/Optimization
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
|
@ -22,9 +22,9 @@ ifeq ($(CROSS), 1)
|
|||||||
DFU = ../tools/dfu.py
|
DFU = ../tools/dfu.py
|
||||||
PYDFU = ../tools/pydfu.py
|
PYDFU = ../tools/pydfu.py
|
||||||
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
|
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
|
||||||
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
|
CFLAGS = $(INC) -Wall -Werror -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4) $(COPT)
|
||||||
else
|
else
|
||||||
CFLAGS = -m32 $(INC) -Wall -Werror -ansi -std=gnu99 $(COPT)
|
CFLAGS = -m32 $(INC) -Wall -Werror -std=gnu99 $(COPT)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#Debugging/Optimization
|
#Debugging/Optimization
|
||||||
|
@ -19,7 +19,7 @@ INC += -I$(BUILD)
|
|||||||
# compiler settings
|
# compiler settings
|
||||||
CWARN = -Wall -Werror
|
CWARN = -Wall -Werror
|
||||||
CWARN += -Wpointer-arith -Wuninitialized
|
CWARN += -Wpointer-arith -Wuninitialized
|
||||||
CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
|
CFLAGS = $(INC) $(CWARN) -std=gnu99 $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
|
||||||
CFLAGS += -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables
|
CFLAGS += -fdata-sections -ffunction-sections -fno-asynchronous-unwind-tables
|
||||||
|
|
||||||
# Debugging/Optimization
|
# Debugging/Optimization
|
||||||
|
@ -21,7 +21,7 @@ INC += -I$(XC16)/include
|
|||||||
INC += -I$(XC16)/support/$(PARTFAMILY)/h
|
INC += -I$(XC16)/support/$(PARTFAMILY)/h
|
||||||
|
|
||||||
CFLAGS_PIC16BIT = -mcpu=$(PART) -mlarge-code
|
CFLAGS_PIC16BIT = -mcpu=$(PART) -mlarge-code
|
||||||
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_PIC16BIT) $(COPT)
|
CFLAGS = $(INC) -Wall -Werror -std=gnu99 -nostdlib $(CFLAGS_PIC16BIT) $(COPT)
|
||||||
|
|
||||||
#Debugging/Optimization
|
#Debugging/Optimization
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
|
@ -15,7 +15,7 @@ INC += -I$(BUILD)
|
|||||||
INC += -I../tools/tinytest/
|
INC += -I../tools/tinytest/
|
||||||
|
|
||||||
CFLAGS_CORTEX_M3 = -mthumb -mcpu=cortex-m3 -mfloat-abi=soft
|
CFLAGS_CORTEX_M3 = -mthumb -mcpu=cortex-m3 -mfloat-abi=soft
|
||||||
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M3) $(COPT) \
|
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -std=gnu99 $(CFLAGS_CORTEX_M3) $(COPT) \
|
||||||
-ffunction-sections -fdata-sections
|
-ffunction-sections -fdata-sections
|
||||||
|
|
||||||
#Debugging/Optimization
|
#Debugging/Optimization
|
||||||
|
@ -56,7 +56,7 @@ CFLAGS_MCU_f4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES
|
|||||||
CFLAGS_MCU_f7 = $(CFLAGS_CORTEX_M) -mtune=cortex-m7 -mcpu=cortex-m7 -DMCU_SERIES_F7
|
CFLAGS_MCU_f7 = $(CFLAGS_CORTEX_M) -mtune=cortex-m7 -mcpu=cortex-m7 -DMCU_SERIES_F7
|
||||||
CFLAGS_MCU_l4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES_L4
|
CFLAGS_MCU_l4 = $(CFLAGS_CORTEX_M) -mtune=cortex-m4 -mcpu=cortex-m4 -DMCU_SERIES_L4
|
||||||
|
|
||||||
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD)
|
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -std=gnu99 -nostdlib $(CFLAGS_MOD)
|
||||||
CFLAGS += -D$(CMSIS_MCU)
|
CFLAGS += -D$(CMSIS_MCU)
|
||||||
CFLAGS += $(CFLAGS_MCU_$(MCU_SERIES))
|
CFLAGS += $(CFLAGS_MCU_$(MCU_SERIES))
|
||||||
CFLAGS += $(COPT)
|
CFLAGS += $(COPT)
|
||||||
|
@ -36,7 +36,7 @@ INC += -I../lib/mp-readline
|
|||||||
INC += -I$(BUILD)
|
INC += -I$(BUILD)
|
||||||
INC += -Icore
|
INC += -Icore
|
||||||
|
|
||||||
CFLAGS = $(INC) -Wall -Wpointer-arith -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4)
|
CFLAGS = $(INC) -Wall -Wpointer-arith -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4)
|
||||||
LDFLAGS = -nostdlib -T mk20dx256.ld -msoft-float -mfloat-abi=soft
|
LDFLAGS = -nostdlib -T mk20dx256.ld -msoft-float -mfloat-abi=soft
|
||||||
|
|
||||||
ifeq ($(USE_ARDUINO_TOOLCHAIN),1)
|
ifeq ($(USE_ARDUINO_TOOLCHAIN),1)
|
||||||
|
@ -23,7 +23,7 @@ INC += -I$(BUILD)
|
|||||||
# compiler settings
|
# compiler settings
|
||||||
CWARN = -Wall -Werror
|
CWARN = -Wall -Werror
|
||||||
CWARN += -Wpointer-arith -Wuninitialized
|
CWARN += -Wpointer-arith -Wuninitialized
|
||||||
CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
|
CFLAGS = $(INC) $(CWARN) -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
|
||||||
|
|
||||||
# Debugging/Optimization
|
# Debugging/Optimization
|
||||||
ifdef DEBUG
|
ifdef DEBUG
|
||||||
|
@ -15,7 +15,7 @@ INC += -I..
|
|||||||
INC += -I$(BUILD)
|
INC += -I$(BUILD)
|
||||||
|
|
||||||
# compiler settings
|
# compiler settings
|
||||||
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -DUNIX -D__USE_MINGW_ANSI_STDIO=1 $(CFLAGS_MOD) $(COPT)
|
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -std=gnu99 -DUNIX -D__USE_MINGW_ANSI_STDIO=1 $(CFLAGS_MOD) $(COPT)
|
||||||
LDFLAGS = $(LDFLAGS_MOD) -lm
|
LDFLAGS = $(LDFLAGS_MOD) -lm
|
||||||
|
|
||||||
# Debugging/Optimization
|
# Debugging/Optimization
|
||||||
|
Loading…
Reference in New Issue
Block a user