Makefile: Modify default CFLAGS
This removes the "-g -O0" default (to leave them up to the user CFLAGS), and adds a switch to ignore "unused result" warnings. The latter is relevant when trying to compile nand-part.c with optimizations enabled. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
This commit is contained in:
parent
3dab68f94c
commit
bf735b2c47
@ -5,7 +5,7 @@ language: c
|
||||
|
||||
# treat all warnings as errors, fake cross-toolchain (build everything on host)
|
||||
env:
|
||||
- CFLAGS=-Werror CROSS_COMPILE=""
|
||||
- CFLAGS="-g -O2 -Werror" CROSS_COMPILE=""
|
||||
|
||||
os:
|
||||
- linux
|
||||
|
||||
3
Makefile
3
Makefile
@ -17,7 +17,8 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
CC ?= gcc
|
||||
DEFAULT_CFLAGS := -g -O0 -Wall -Wextra -std=c99
|
||||
DEFAULT_CFLAGS := -std=c99
|
||||
DEFAULT_CFLAGS += -Wall -Wextra -Wno-unused-result
|
||||
|
||||
DEFAULT_CFLAGS += -D_POSIX_C_SOURCE=200112L
|
||||
# Define _BSD_SOURCE, necessary to expose all endian conversions properly.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user