Skip to content
Snippets Groups Projects
Unverified Commit 6ca71958 authored by Joakim Nohlgård's avatar Joakim Nohlgård Committed by GitHub
Browse files

Merge pull request #9544 from OTAkeys/pr/cflags_gnu99

cflags: use gnu99 only if nothing else is specified (mips, msp430, native)
parents 0d527679 0cbef095
No related branches found
No related tags found
No related merge requests found
......@@ -47,7 +47,11 @@ export CGANNOTATE ?= cg_annotate
export GPROF ?= gprof
# basic cflags:
export CFLAGS += -Wall -Wextra -pedantic -std=gnu99
export CFLAGS += -Wall -Wextra -pedantic
# default std set to gnu99 of not overwritten by user
ifeq (,$(filter -std=%, $(CFLAGS)))
export CFLAGS += -std=gnu99
endif
ifeq ($(shell uname -m),x86_64)
export CFLAGS += -m32
......
......@@ -32,7 +32,9 @@ endif
# newlib commit 81c17949f0419d1c4fee421c60987ea1149522ae
# https://cygwin.com/git/gitweb.cgi?p=newlib-cygwin.git;a=commitdiff;h=81c17949f0419d1c4fee421c60987ea1149522ae
# Otherwise we get an error about a missing declaration of strnlen in some parts.
export CFLAGS += -std=gnu99
ifeq (, $(filter -std=%, $(CFLAGS)))
export CFLAGS += -std=gnu99
endif
export CFLAGS_CPU = -EL -mabi=$(ABI)
export CFLAGS_LINK = -ffunction-sections -fno-builtin -fshort-enums -fdata-sections
export CFLAGS_DBG = -g3
......
......@@ -2,7 +2,11 @@
export TARGET_ARCH ?= msp430
# define build specific options
CFLAGS_CPU = -mmcu=$(CPU_MODEL) -std=gnu99
CFLAGS_CPU = -mmcu=$(CPU_MODEL)
# default std set to gnu99 of not overwritten by user
ifeq (, $(filter -std=%, $(CFLAGS)))
export CFLAGS += -std=gnu99
endif
CFLAGS_LINK = -ffunction-sections -fdata-sections
CFLAGS_DBG ?= -gdwarf-2
CFLAGS_OPT ?= -Os
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment