From: Arnaldo Carvalho de Melo Date: Tue, 12 Feb 2019 14:20:56 +0000 (-0300) Subject: tools build: Add -lrt to FEATURE_CHECK_LDFLAGS-libaio X-Git-Tag: v5.1-rc1~163^2~3^2~26 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa8f9c517ebce7a0959da064ef2660ea03f133f8;p=thirdparty%2Fkernel%2Flinux.git tools build: Add -lrt to FEATURE_CHECK_LDFLAGS-libaio Since we need it to resolve the AIO symbols, otherwise we fail with: $ cat /tmp/build/perf/feature/test-all.make.output /usr/bin/ld: /tmp/ccEqrj36.o: undefined reference to symbol 'aio_return64@@GLIBC_2.2.5' /usr/bin/ld: //usr/lib64/librt.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status $ When we added the aio support in 'perf record' only the test-libaio.bin target got the -lrt, i.e. the feature detection slow path. Fix it. Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Alexey Budankov Cc: Andi Kleen Cc: Jiri Olsa Cc: Namhyung Kim Cc: Peter Zijlstra Fixes: 2a07d814747b ("tools build feature: Check if libaio is available") Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config index b441c88cafa1f..e6360d47e73a2 100644 --- a/tools/perf/Makefile.config +++ b/tools/perf/Makefile.config @@ -218,6 +218,8 @@ FEATURE_CHECK_LDFLAGS-libpython := $(PYTHON_EMBED_LDOPTS) FEATURE_CHECK_CFLAGS-libpython-version := $(PYTHON_EMBED_CCOPTS) FEATURE_CHECK_LDFLAGS-libpython-version := $(PYTHON_EMBED_LDOPTS) +FEATURE_CHECK_LDFLAGS-libaio = -lrt + CFLAGS += -fno-omit-frame-pointer CFLAGS += -ggdb3 CFLAGS += -funwind-tables