linux/debian/patches/bugfix/all/perf-Dont-use-dev-null-as-o...

32 lines
1.8 KiB
Diff

From 8d07027f1d40d85aeb4a410f23819ebb0c216ab3 Mon Sep 17 00:00:00 2001
From: Ben Hutchings <ben@decadent.org.uk>
Date: Thu, 8 Jul 2010 02:51:43 +0100
Subject: [PATCH 3/3] perf: Don't use /dev/null as the output file for libelf test
On some architectures ld makes a second pass over the output file and
this won't work.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
tools/perf/Makefile | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 33b02a5..30fe5e3 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -423,8 +423,8 @@ ifeq ($(uname_S),Darwin)
PTHREAD_LIBS =
endif
-ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null && echo y"), y)
- ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y"), y)
+ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o dummy $(ALL_LDFLAGS) > /dev/null && echo y; rm -f dummy"), y)
+ ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o dummy $(ALL_LDFLAGS) > /dev/null 2>&1 && echo y; rm -f dummy"), y)
BASIC_CFLAGS += -DLIBELF_NO_MMAP
endif
else
--
1.7.1