summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Sundvik <fsundvik@gmail.com>2016-08-27 16:43:35 +0200
committerFred Sundvik <fsundvik@gmail.com>2016-08-27 20:57:49 +0200
commit42baa6cf43ab1da79887e74b9ad71379c13094f9 (patch)
tree204b606dcc34b8b94ff35c48e3a8edc169bb3dcf
parent7eefb34e7c4f162b9568ff880d0e4e5214e1b9c9 (diff)
downloadqmk_firmware-42baa6cf43ab1da79887e74b9ad71379c13094f9.tar.gz
qmk_firmware-42baa6cf43ab1da79887e74b9ad71379c13094f9.tar.xz
Disable map file creation when building tests
It causes strange linker warnings on cygwin.
-rw-r--r--build_test.mk1
-rw-r--r--tmk_core/rules.mk6
2 files changed, 6 insertions, 1 deletions
diff --git a/build_test.mk b/build_test.mk
index 9f5d6e0af..ee15a4572 100644
--- a/build_test.mk
+++ b/build_test.mk
@@ -31,6 +31,7 @@ $(GTEST_OUTPUT)_DEFS :=
$(GTEST_OUTPUT)_INC := $(GTEST_INC) $(GTEST_INTERNAL_INC)
LDFLAGS += -lstdc++ -lpthread -shared-libgcc
+CREATE_MAP := no
VPATH +=\
$(LIB_PATH)/googletest\
diff --git a/tmk_core/rules.mk b/tmk_core/rules.mk
index 317f55e08..695fe0bad 100644
--- a/tmk_core/rules.mk
+++ b/tmk_core/rules.mk
@@ -161,6 +161,7 @@ SCANF_LIB =
MATH_LIB = -lm
+CREATE_MAP ?= yes
#---------------- Linker Options ----------------
@@ -171,7 +172,10 @@ MATH_LIB = -lm
# Comennt out "--relax" option to avoid a error such:
# (.vectors+0x30): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_12'
#
-LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref
+
+ifeq ($(CREATE_MAP),yes)
+ LDFLAGS += -Wl,-Map=$(BUILD_DIR)/$(TARGET).map,--cref
+endif
#LDFLAGS += -Wl,--relax
LDFLAGS += $(EXTMEMOPTS)
LDFLAGS += $(patsubst %,-L%,$(EXTRALIBDIRS))