Browse Source

Add -Wpointer-arith flag to prevent problems with pointer arithmetic on void*

pull/942/head
stijn 10 years ago
parent
commit
4e54c876a7
  1. 2
      qemu-arm/Makefile
  2. 2
      stmhal/Makefile
  3. 2
      teensy/Makefile
  4. 2
      unix-cpy/Makefile
  5. 2
      unix/Makefile
  6. 2
      windows/Makefile

2
qemu-arm/Makefile

@ -14,7 +14,7 @@ INC += -I$(PY_SRC)
INC += -I$(BUILD)
CFLAGS_CORTEX_M3 = -mthumb -mcpu=cortex-m3
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M3) $(COPT) \
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 $(CFLAGS_CORTEX_M3) $(COPT) \
-flto -ffunction-sections -fdata-sections
#Debugging/Optimization

2
stmhal/Makefile

@ -42,7 +42,7 @@ INC += -I$(USBDEV_DIR)/core/inc -I$(USBDEV_DIR)/class/cdc_msc_hid/inc
INC += -I$(FATFS_DIR)/src
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_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -nostdlib $(CFLAGS_MOD) $(CFLAGS_CORTEX_M4) $(COPT)
CFLAGS += -Iboards/$(BOARD)
LDFLAGS = -nostdlib -T stm32f405.ld -Map=$(@:.elf=.map) --cref

2
teensy/Makefile

@ -35,7 +35,7 @@ INC += -I../stmhal
INC += -I$(BUILD)
INC += -Icore
CFLAGS = $(INC) -Wall -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4)
CFLAGS = $(INC) -Wall -Wpointer-arith -ansi -std=gnu99 -nostdlib $(CFLAGS_CORTEX_M4)
LDFLAGS = -nostdlib -T mk20dx256.ld -msoft-float -mfloat-abi=soft
ifeq ($(USE_ARDUINO_TOOLCHAIN),1)

2
unix-cpy/Makefile

@ -11,7 +11,7 @@ INC += -I$(PY_SRC)
INC += -I$(BUILD)
# compiler settings
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -DUNIX
LDFLAGS = -lm
# Debugging/Optimization

2
unix/Makefile

@ -18,7 +18,7 @@ INC += -I$(PY_SRC)
INC += -I$(BUILD)
# compiler settings
CWARN = -Wall -Werror
CWARN = -Wall -Wpointer-arith -Werror
CFLAGS = $(INC) $(CWARN) -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT) $(CFLAGS_EXTRA)
# Debugging/Optimization

2
windows/Makefile

@ -15,7 +15,7 @@ INC += -I$(PY_SRC)
INC += -I$(BUILD)
# compiler settings
CFLAGS = $(INC) -Wall -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
CFLAGS = $(INC) -Wall -Wpointer-arith -Werror -ansi -std=gnu99 -DUNIX $(CFLAGS_MOD) $(COPT)
LDFLAGS = $(LDFLAGS_MOD) -lm
ifeq ($(CROSS_COMPILE),i686-w64-mingw32-)
CFLAGS += -D__USE_MINGW_ANSI_STDIO=1

Loading…
Cancel
Save