trace-cmd: overwrite CFLAGS
PATCH 1/1 trace-cmd: overwrite CFLAGS
Ptrace support detection is ignored when CFLAGS is set by buildroot.
Use override in Makefile to add -DWARN_NO_PTRACE and -DNO_PTRACE in CFLAGS if ptrace is not available.
Fixes:
http://autobuild.buildroot.net/results/60e/60ed317d52d93ba2c087aa6ff4f422d760806d89//
--- .../trace-cmd-0002-Makefile-overwrite-CFLAGS.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+)
create mode 100644package/trace-cmd/trace-cmd-0002-Makefile-overwrite-CFLAGS.patch
(quoted diff) +0 -0
a/package/trace-cmd/trace-cmd-0002-Makefile-overwrite-CFLAGS.patch b/package/trace-cmd/trace-cmd-0002-Makefile-overwrite-CFLAGS.patch new file mode 100644
index 0000000..f4afa53
package/trace-cmd/trace-cmd-0002-Makefile-overwrite-CFLAGS.patch new file +2 -0
@@ -0,0 +1,33 @@ + +Ptrace support detection is ignored when CFLAGS is set in command
arguments.
+
+Use override in Makefile to add -DWARN_NO_PTRACE and -DNO_PTRACE in CFLAGS +if ptrace is not available.
+
+Signed-off-by: Romain <[email protected]>
+--- + Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 2f862ec..51b0df3 100644
+--- a/Makefile
++++ b/Makefile
+@@ -229,12 +229,12 @@ CFLAGS += -D_GNU_SOURCE
+ ifndef NO_PTRACE
+ ifneq ($(call try-cc,$(SOURCE_PTRACE),),y)
+ NO_PTRACE = 1 +- CFLAGS += -DWARN_NO_PTRACE ++ override CFLAGS += -DWARN_NO_PTRACE
+ endif
+ endif
+
+ ifdef NO_PTRACE
+-CFLAGS += -DNO_PTRACE
++override CFLAGS += -DNO_PTRACE
+ endif
+
+ # Append required CFLAGS
+--
+1.8.1.4
+
Signature · 1 line
1.8.1.4
PATCH 1/1 trace-cmd: overwrite CFLAGS
Quoted 11 lines · Romain Naour
Ptrace support detection is ignored when CFLAGS is set by buildroot.
Use override in
Makefileto add -DWARN_NO_PTRACE and -DNO_PTRACE in CFLAGS if ptrace is not available.Fixes:
http://autobuild.buildroot.net/results/60e/60ed317d52d93ba2c087aa6ff4f422d760806d89//Signed-off-by Romain <[email protected]>
Looks good, but I didn't test it.
However, we should also add NO_PTRACE to TRACE_CMD_MAKE_OPTS ifBR2_PACKAGE_PTRACE is not selected, and add ptrace to the dependencies if it is.
Regards,
Arnout
Quoted 49 lines
--- .../trace-cmd-0002-Makefile-overwrite-CFLAGS.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+)create mode 100644
package/trace-cmd/trace-cmd-0002-Makefile-overwrite-CFLAGS.patchdiff --git
a/package/trace-cmd/trace-cmd-0002-Makefile-overwrite-CFLAGS.patchb/package/trace-cmd/trace-cmd-0002-Makefile-overwrite-CFLAGS.patchnew file mode 100644
index 0000000..f4afa53package/trace-cmd/trace-cmd-0002-Makefile-overwrite-CFLAGS.patch new file +2
-0@@ -0,0 +1,33 @@ + +Ptrace support detection is ignored when CFLAGS is set in commandarguments.
package/trace-cmd/trace-cmd-0002-Makefile-overwrite-CFLAGS.patch new file +31
-0+ +Use override in Makefile to add -DWARN_NO_PTRACE and -DNO_PTRACE in CFLAGS +if ptrace is not available. + +Signed-off-by: Romain <[email protected]> +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 2f862ec..51b0df3 100644 +--- a/Makefile ++++ b/Makefile +@@ -229,12 +229,12 @@ CFLAGS += -D_GNU_SOURCE + ifndef NO_PTRACE + ifneq ($(call try-cc,$(SOURCE_PTRACE),),y) + NO_PTRACE = 1 +- CFLAGS += -DWARN_NO_PTRACE ++ override CFLAGS += -DWARN_NO_PTRACE + endif + endif + + ifdef NO_PTRACE +-CFLAGS += -DNO_PTRACE ++override CFLAGS += -DNO_PTRACE + endif + + # Append required CFLAGS +-- +1.8.1.4 +
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 trace-cmd: overwrite CFLAGS
Dear Arnout Vandecappelle,
Quoted 3 lines · Arnout Vandecappelle
However, we should also add
NO_PTRACEtoTRACE_CMD_MAKE_OPTSifBR2_PACKAGE_PTRACEis not selected, and add ptrace to the dependencies if it is.
Huh? ptrace is not a package, it's a libc function. See man ptrace(2).
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 trace-cmd: overwrite CFLAGS
Quoted 9 lines · Thomas Petazzoni
Dear Arnout Vandecappelle,
Quoted 3 lines · Arnout Vandecappelle
However, we should also add
NO_PTRACEtoTRACE_CMD_MAKE_OPTSifBR2_PACKAGE_PTRACEis not selected, and add ptrace to the dependencies if it is.Huh? ptrace is not a package, it's a libc function. See man ptrace(2).
D'oh!
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
Thomas Petazzoni
AppliedPATCH 1/1 trace-cmd: overwrite CFLAGS
In reply to Romain NaourDear Romain Naour,
Quoted 10 lines · Romain Naour
Ptrace support detection is ignored when CFLAGS is set by buildroot.
Use override in
Makefileto add -DWARN_NO_PTRACE and -DNO_PTRACE in CFLAGS if ptrace is not available.Fixes:
http://autobuild.buildroot.net/results/60e/60ed317d52d93ba2c087aa6ff4f422d760806d89//Signed-off-by Romain <[email protected]>
Applied to for-peter-2013.11, thanks. However, your patch was badly line-wrapped. Could you use 'git send-email' for your next patches, instead of Thunderbird?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 trace-cmd: overwrite CFLAGS
Hi,
Le 30/10/2013 22:45, Thomas Petazzoni a ?crit :
Quoted 8 lines
Dear Romain Naour,
Quoted 5 lines · Romain Naour
Ptrace support detection is ignored when CFLAGS is set by buildroot.
Use override in
Makefileto add -DWARN_NO_PTRACE and -DNO_PTRACE in CFLAGS if ptrace is not available.
Quoted 8 lines
Quoted 4 lines
Fixes:
http://autobuild.buildroot.net/results/60e/60ed317d52d93ba2c087aa6ff4f422d760806d89//Signed-off-by Romain <[email protected]>Applied to for-peter-2013.11, thanks. However, your patch was badly line-wrapped. Could you use 'git send-email' for your next patches, instead of Thunderbird?
Sorry for that, I will use git send-email for my next patch :)
Thanks !
Romain