b17d7df0d266d19fc61162afdad9d4f04f5e6c2e
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / trace-cmd / 0001-Fix-ptrace-detection.patch
1 From 0070081ffe65a4fbe442044ddfcc818593c98e33 Mon Sep 17 00:00:00 2001
2 From: Romain Naour <romain.naour@openwide.fr>
3 Date: Wed, 30 Oct 2013 22:35:34 +0100
4 Subject: [PATCH] Fix ptrace detection
5
6 Ptrace support detection is ignored when CFLAGS is set in command
7 arguments. Use override in Makefile to add -DWARN_NO_PTRACE and
8 -DNO_PTRACE in CFLAGS if ptrace is not available.
9
10 Signed-off-by: Romain Naour <romain.naour@openwide.fr>
11 ---
12  Makefile | 4 ++--
13  1 file changed, 2 insertions(+), 2 deletions(-)
14
15 diff --git a/Makefile b/Makefile
16 index 83329ca..01b4f45 100644
17 --- a/Makefile
18 +++ b/Makefile
19 @@ -223,12 +223,12 @@ LDFLAGS ?=
20  ifndef NO_PTRACE
21  ifneq ($(call try-cc,$(SOURCE_PTRACE),),y)
22         NO_PTRACE = 1
23 -       CFLAGS += -DWARN_NO_PTRACE
24 +       override CFLAGS += -DWARN_NO_PTRACE
25  endif
26  endif
27  
28  ifdef NO_PTRACE
29 -CFLAGS += -DNO_PTRACE
30 +override CFLAGS += -DNO_PTRACE
31  endif
32  
33  # Append required CFLAGS
34 -- 
35 1.8.1.2
36