Browse Source

Set std=gnu11 as default

pull/11/head
gkostka 9 years ago
parent
commit
ae719f95ab
  1. 2
      toolchain/common/arm-none-eabi.cmake
  2. 2
      toolchain/common/avr-gcc.cmake
  3. 2
      toolchain/common/bfin-elf.cmake

2
toolchain/common/arm-none-eabi.cmake

@ -7,7 +7,7 @@ set(OBJCOPY arm-none-eabi-objcopy)
set(OBJDUMP arm-none-eabi-objdump) set(OBJDUMP arm-none-eabi-objdump)
set(SIZE arm-none-eabi-size) set(SIZE arm-none-eabi-size)
set(CMAKE_C_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} -Wall -fno-builtin -std=gnu99 -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags") set(CMAKE_C_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} -Wall -fno-builtin -std=gnu11 -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags")
set(CMAKE_CXX_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} -Wall -fno-builtin -fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags") set(CMAKE_CXX_FLAGS "${MCPU_FLAGS} ${VFP_FLAGS} -Wall -fno-builtin -fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags")
set(CMAKE_ASM_FLAGS "${MCPU_FLAGS} -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags") set(CMAKE_ASM_FLAGS "${MCPU_FLAGS} -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags")
set(CMAKE_EXE_LINKER_FLAGS "${MCPU_FLAGS} ${LD_FLAGS} -Wl,--gc-sections" CACHE INTERNAL "exe link flags") set(CMAKE_EXE_LINKER_FLAGS "${MCPU_FLAGS} ${LD_FLAGS} -Wl,--gc-sections" CACHE INTERNAL "exe link flags")

2
toolchain/common/avr-gcc.cmake

@ -7,7 +7,7 @@ set(OBJCOPY avr-objcopy)
set(OBJDUMP avr-objdump) set(OBJDUMP avr-objdump)
set(SIZE avr-size) set(SIZE avr-size)
set(CMAKE_C_FLAGS "${MCPU_FLAGS} -Wall -std=gnu99 -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags") set(CMAKE_C_FLAGS "${MCPU_FLAGS} -Wall -std=gnu11 -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags")
set(CMAKE_CXX_FLAGS "${MCPU_FLAGS} -Wall -fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags") set(CMAKE_CXX_FLAGS "${MCPU_FLAGS} -Wall -fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags")
set(CMAKE_ASM_FLAGS "${MCPU_FLAGS} -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags") set(CMAKE_ASM_FLAGS "${MCPU_FLAGS} -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags")
set(CMAKE_EXE_LINKER_FLAGS "${MCPU_FLAGS} -nostartfiles -Wl,--gc-sections" CACHE INTERNAL "exe link flags") set(CMAKE_EXE_LINKER_FLAGS "${MCPU_FLAGS} -nostartfiles -Wl,--gc-sections" CACHE INTERNAL "exe link flags")

2
toolchain/common/bfin-elf.cmake

@ -7,7 +7,7 @@ set(OBJCOPY bfin-elf-objcopy)
set(OBJDUMP bfin-elf-objdump) set(OBJDUMP bfin-elf-objdump)
set(SIZE bfin-elf-size) set(SIZE bfin-elf-size)
set(CMAKE_C_FLAGS "${MCPU_FLAGS} -Wall -std=gnu99 -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags") set(CMAKE_C_FLAGS "${MCPU_FLAGS} -Wall -std=gnu11 -fdata-sections -ffunction-sections" CACHE INTERNAL "c compiler flags")
set(CMAKE_CXX_FLAGS "${MCPU_FLAGS} -Wall -fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags") set(CMAKE_CXX_FLAGS "${MCPU_FLAGS} -Wall -fdata-sections -ffunction-sections" CACHE INTERNAL "cxx compiler flags")
set(CMAKE_ASM_FLAGS "${MCPU_FLAGS} -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags") set(CMAKE_ASM_FLAGS "${MCPU_FLAGS} -x assembler-with-cpp" CACHE INTERNAL "asm compiler flags")
set(CMAKE_EXE_LINKER_FLAGS "${MCPU_FLAGS} -nostartfiles -Wl,--gc-sections" CACHE INTERNAL "exe link flags") set(CMAKE_EXE_LINKER_FLAGS "${MCPU_FLAGS} -nostartfiles -Wl,--gc-sections" CACHE INTERNAL "exe link flags")

Loading…
Cancel
Save