selftests: Makefile: clear LDFLAGS for make O=dir use-case
authorShuah Khan <shuahkh@osg.samsung.com>
Fri, 8 Sep 2017 01:57:43 +0000 (19:57 -0600)
committerShuah Khan <shuahkh@osg.samsung.com>
Thu, 21 Sep 2017 13:55:37 +0000 (07:55 -0600)
kselftest target fails when object directory is specified to relocate
objects. Inherited "LDFLAGS = -m" fails the test builds. Clear it.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
tools/testing/selftests/Makefile

index 26ce4f7168be534de2eef4be6650de9617b03b33..f4368db011ea23d5b477ef7fb609d33dbe6e268c 100644 (file)
@@ -52,6 +52,10 @@ override LDFLAGS =
 override MAKEFLAGS =
 endif
 
+ifneq ($(KBUILD_SRC),)
+override LDFLAGS =
+endif
+
 BUILD := $(O)
 ifndef BUILD
   BUILD := $(KBUILD_OUTPUT)