Added a configure test for the linker flag --build-id=none.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11164 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/Makefile.tool.am b/Makefile.tool.am
index 36cdd6c..1c90a09 100644
--- a/Makefile.tool.am
+++ b/Makefile.tool.am
@@ -26,8 +26,12 @@
 endif
 
 
+# -Wl,--build-id=none is needed when linking tools on Linux. Without this
+# flag newer ld versions (2.20 and later) create a .note.gnu.build-id at the
+# default text segment address, which of course means the resulting executable
+# is unusable. So we have to tell ld not to generate that, with --build-id=none.
 TOOL_LDFLAGS_COMMON_LINUX = \
-	-static -nodefaultlibs -nostartfiles -u _start
+	-static -nodefaultlibs -nostartfiles -u _start @FLAG_NO_BUILD_ID@
 TOOL_LDFLAGS_COMMON_AIX5 = \
 	-static -Wl,-e_start_valgrind
 TOOL_LDFLAGS_COMMON_DARWIN = \