lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 30 Nov 2011 16:19:20 -0800
From:	Darren Hart <dvhart@...ux.intel.com>
To:	"lkml, " <linux-kernel@...r.kernel.org>
CC:	Steven Rostedt <rostedt@...dmis.org>,
	Richard Purdie <richard.purdie@...uxfoundation.org>
Subject: [PATCH] trace-cmd: Cross-compile fixes for LDFLAGS and include path

Add ability for the Makefile to respect LDFLAGS.
Also remove hardcoded /usr/local/include include path.

Signed-off-by: Richard Purdie <richard.purdie@...uxfoundation.org>
Signed-off-by: Darren Hart <dvhart@...ux.intel.com>

---
 Makefile |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: git/Makefile
===================================================================
--- git.orig/Makefile
+++ git/Makefile
@@ -202,12 +202,13 @@ export Q VERBOSE
 TRACECMD_VERSION = $(TC_VERSION).$(TC_PATCHLEVEL).$(TC_EXTRAVERSION)
 KERNELSHARK_VERSION = $(KS_VERSION).$(KS_PATCHLEVEL).$(KS_EXTRAVERSION)
 
-INCLUDES = -I. -I/usr/local/include $(CONFIG_INCLUDES)
+INCLUDES = -I. $(CONFIG_INCLUDES)
 
 include features.mk
 
 # Set compile option CFLAGS if not set elsewhere
 CFLAGS ?= -g -Wall
+LDFLAGS ?=
 
 ifndef NO_PTRACE
 ifneq ($(call try-cc,$(SOURCE_PTRACE),),y)
@@ -251,7 +252,7 @@ do_fpic_compile =					\
 
 do_app_build =						\
 	($(print_app_build)				\
-	$(CC) $^ -rdynamic -o $@ $(CONFIG_LIBS) $(LIBS))
+	$(CC) $^ -rdynamic -o $@ $(LDFLAGS) $(CONFIG_LIBS) $(LIBS))
 
 do_compile_shared_library =			\
 	($(print_shared_lib_compile)		\
@@ -263,7 +264,7 @@ do_compile_plugin_obj =				\
 
 do_plugin_build =				\
 	($(print_plugin_build)			\
-	$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $<)
+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -nostartfiles -o $@ $<)
 
 do_build_static_lib =				\
 	($(print_static_lib_build)		\
-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ