Skip to content

Commit 2cb4e27

Browse files
committedMay 14, 2018
Added a configurable linker flag to enable linker warnings as errors since OSX
requires a diffent linker flag.
1 parent 07ddf50 commit 2cb4e27

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
 

‎Makefile.include

+6-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ CFLAGS += -DCONTIKI_BOARD_STRING=\"$(BOARD)\"
5050
endif
5151

5252
CFLAGS += -Wno-unused-const-variable
53-
LDFLAGS = -Wl,--fatal-warnings
53+
54+
LDFLAGS_WERROR ?= -Wl,--fatal-warnings
55+
56+
ifeq ($(WERROR),1)
57+
LDFLAGS += $(LDFLAGS_WERROR)
58+
endif
5459

5560
MODULES += os os/sys os/dev os/lib os/services
5661

‎arch/cpu/native/Makefile.native

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ CFLAGS += $(CFLAGSNO)
2222

2323
ifeq ($(HOST_OS),Darwin)
2424
AROPTS = -rc
25+
LDFLAGS_WERROR := -Wl,-fatal_warnings
2526
LDFLAGS += -Wl,-flat_namespace,-map,$(CONTIKI_NG_PROJECT_MAP)
2627
CFLAGS += -DHAVE_SNPRINTF=1 -U__ASSERT_USE_STDERR
2728
else

0 commit comments

Comments
 (0)
Please sign in to comment.