Re: [PATCH v2] trace-cmd: Only add udis86 CFLAGS and LDFLAGS if it is found

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 24 Jul 2019 19:07:58 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> 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@xxxxx
> Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
Tested-by: Patrick McLean <patrick.mclean@xxxxxxxx>
> ---
> 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
>  




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux