Merge pull request #519 from nfi/contrib/osx-linker-fatal-warnings

Added a configurable linker flag to enable linker warnings as errors
This commit is contained in:
George Oikonomou 2018-05-15 22:25:23 +01:00 committed by GitHub
commit 4581785134
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -50,7 +50,12 @@ CFLAGS += -DCONTIKI_BOARD_STRING=\"$(BOARD)\"
endif
CFLAGS += -Wno-unused-const-variable
LDFLAGS = -Wl,--fatal-warnings
LDFLAGS_WERROR ?= -Wl,--fatal-warnings
ifeq ($(WERROR),1)
LDFLAGS += $(LDFLAGS_WERROR)
endif
MODULES += os os/sys os/dev os/lib os/services

View File

@ -22,6 +22,7 @@ CFLAGS += $(CFLAGSNO)
ifeq ($(HOST_OS),Darwin)
AROPTS = -rc
LDFLAGS_WERROR := -Wl,-fatal_warnings
LDFLAGS += -Wl,-flat_namespace,-map,$(CONTIKI_NG_PROJECT_MAP)
CFLAGS += -DHAVE_SNPRINTF=1 -U__ASSERT_USE_STDERR
else