linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Manually setting libbfd unavailable will cause perf building aborted
@ 2021-04-01  6:06 anzhou94
  0 siblings, 0 replies; only message in thread
From: anzhou94 @ 2021-04-01  6:06 UTC (permalink / raw)
  To: linux-perf-users

Hi, all


When buiiding perf, whether libbfd available and whether libbfd supports
buildid feature will be checked. The check results are stored in two
variables: feature-libbfd and feature-libbfd-buildid. Then the variables
will be used in tools/perf/Makefile.conf as follows:

ifeq ($(feature-libbfd), 1)
  EXTLIBS += -lbfd -lopcodes
else

  ...

endif

ifeq ($(feature-libbfd-buildid), 1)
  CFLAGS += -DHAVE_LIBBFD_BUILDID_SUPPORT
else
  msg := $(warning Old version of libbfd/binutils things ... will not be
available);
endif


When compiling and executing the corresponding test program to get the
check results, the above codes works well. While, when manually setting
libbfd unavariable, i.e. feature-libbfd=0, these codes will cause
building perf aborted.


Why? That's because whether libbfd is available and whether libbfd
supports buildid are individually checked and used. When we manually
setting feature-libbfd=0, value of feature-libbfd-buildid could be 1. I
encountered such thing when building debian linux-image from source.

If libbfd unavailable, to check whether libbfd supports build is
meaningless. Hence, unless libbfd available, we shouldn't check whether
libbfd supports buildid. So, the above codes should be fixed:


ifeq ($(feature-libbfd), 1)
  EXTLIBS += -lbfd -lopcodes
else

  ...

  ifeq ($(feature-libbfd-buildid), 1)
    CFLAGS += -DHAVE_LIBBFD_BUILDID_SUPPORT
  else
    msg := $(warning Old version of libbfd/binutils things ... will not
be available);
  endif

endif





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-01  6:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01  6:06 Manually setting libbfd unavailable will cause perf building aborted anzhou94

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).