linux-stable/tools
Thomas Richter b611da43b6 perf build: Build error in libbpf missing initialization
In linux-next tree compiling the perf tool with additional make flags
EXTRA_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -O2" causes a compiler error.
It is the warning 'variable may be used uninitialized' which is treated
as error: I compile it using a FEDORA 28 installation, my gcc compiler
version: gcc (GCC) 8.0.1 20180324 (Red Hat 8.0.1-0.20). The file that
causes the error is tools/lib/bpf/libbpf.c.

  [root@p23lp27] # make V=1 EXTRA_CFLAGS="-Wp,-D_FORTIFY_SOURCE=2 -O2"
  [...]
  Makefile.config:849: No openjdk development package found, please
     install JDK package, e.g. openjdk-8-jdk, java-1.8.0-openjdk-devel
  Warning: Kernel ABI header at 'tools/include/uapi/linux/if_link.h'
          differs from latest version at 'include/uapi/linux/if_link.h'
    CC       libbpf.o
  libbpf.c: In function ‘bpf_perf_event_read_simple’:
  libbpf.c:2342:6: error: ‘ret’ may be used uninitialized in this
  			function [-Werror=maybe-uninitialized]
    int ret;
        ^
  cc1: all warnings being treated as errors
  mv: cannot stat './.libbpf.o.tmp': No such file or directory
  /home6/tmricht/linux-next/tools/build/Makefile.build:96: recipe for target 'libbpf.o' failed

Suggested-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2018-07-28 21:22:40 +02:00
..
accounting
arch tools/headers: Pick up latest kernel ABIs 2018-06-26 08:43:14 +02:00
bpf tools/bpftool: Fix segfault case regarding 'pin' arguments 2018-07-20 10:16:54 +02:00
build tools: build: Use HOSTLDFLAGS with fixdep 2018-07-13 00:48:18 +09:00
cgroup
firewire
gpio
hv
iio tools: iio: iio_generic_buffer: allow continuous looping 2018-05-20 14:55:58 +01:00
include bpf: btf: Sync uapi btf.h to tools 2018-07-25 06:57:55 +02:00
kvm/kvm_stat tools/kvm_stat: Remove unused function 2018-03-28 22:47:06 +02:00
laptop
leds
lib perf build: Build error in libbpf missing initialization 2018-07-28 21:22:40 +02:00
memory-model tools/memory-model: Add reference for 'Simplifying ARM concurrency' 2018-05-15 08:11:19 +02:00
nfsd
objtool objtool: Support GCC 8 '-fnoreorder-functions' 2018-07-02 09:42:11 +02:00
pci
pcmcia
perf Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-07-13 13:33:09 -07:00
power Merge branch 'turbostat' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2018-06-21 00:37:04 +02:00
scripts Kbuild: fix # escaping in .cmd files for future Make 2018-04-11 00:03:02 +09:00
spi
testing bpf: btf: Use exact btf value_size match in map_check_btf() 2018-07-27 03:45:49 +02:00
thermal/tmon tools/thermal: tmon: fix for segfault 2018-03-27 09:51:23 +02:00
time
usb usbip: usbip_detach: fix to check for invalid ports 2018-05-31 12:44:39 +02:00
virtio sg: remove ->sg_magic member 2018-06-29 08:48:06 -06:00
vm mm: mark pages in use for page tables 2018-06-07 17:34:37 -07:00
wmi
Makefile