linux-trace-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McLean <chutzpah@gentoo.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Linux Trace Devel <linux-trace-devel@vger.kernel.org>,
	howaboutsynergy@pm.me
Subject: Re: [PATCH v2] trace-cmd: Only add udis86 CFLAGS and LDFLAGS if it is found
Date: Wed, 24 Jul 2019 16:38:57 -0700	[thread overview]
Message-ID: <20190724163857.1f0e9864@patrickm> (raw)
In-Reply-To: <20190724190758.4e18498f@gandalf.local.home>

On Wed, 24 Jul 2019 19:07:58 -0400
Steven Rostedt <rostedt@goodmis.org> wrote:
This does work for me, sure. I hope claws doesn't mangle the patch too
badly.

> [ Patrick, so this works for you, can you give a "tested-by"? ]
> 
> As we need to update both LDFLAGS and CFLAGS, move the test to see if
> udisc86 is installed to a variable, and then set NO_UDIS86 if it is
> not found. This way we do not need to test if it exists twice, nor
> have LDFLAGS set unconditionally.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204277
> 
> Reported-by: howaboutsynergy@pm.me
> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Tested-by: Patrick McLean <patrick.mclean@sony.com>
> ---
> diff --git a/Makefile b/Makefile
> index 0aa98517..3e63e9e9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -136,9 +136,14 @@ export NO_PYTHON
>  test-build = $(if $(shell sh -c 'echo "$(1)" | \
>  	$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y'),
> $2) 
> +UDIS86_AVAILABLE := $(call test-build,\#include <udis86.h>, y)
> +ifneq ($(strip $(UDIS86_AVAILABLE)), y)
> +NO_UDIS86 := 1
> +endif
> +
>  ifndef NO_UDIS86
>  # have udis86 disassembler library?
> -udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86
> -ludis86) +udis86-flags := -DHAVE_UDIS86 -ludis86
>  udis86-ldflags := -ludis86
>  endif # NO_UDIS86
>  


      reply	other threads:[~2019-07-24 23:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-24 23:07 [PATCH v2] trace-cmd: Only add udis86 CFLAGS and LDFLAGS if it is found Steven Rostedt
2019-07-24 23:38 ` Patrick McLean [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190724163857.1f0e9864@patrickm \
    --to=chutzpah@gentoo.org \
    --cc=howaboutsynergy@pm.me \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).