Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752011AbdF1OTX (ORCPT ); Wed, 28 Jun 2017 10:19:23 -0400 Received: from resqmta-po-10v.sys.comcast.net ([96.114.154.169]:58066 "EHLO resqmta-po-10v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751583AbdF1OTP (ORCPT ); Wed, 28 Jun 2017 10:19:15 -0400 Reply-To: shuah@kernel.org Subject: Re: [PATCH] selftests: net: use LDLIBS instead of LDFLAGS to link against libnuma To: Fathi Boudra , linux-kselftest@vger.kernel.org Cc: linux-kernel@vger.kernel.org, SeongJae Park , Shuah Khan References: <20170628111958.22405-1-fathi.boudra@linaro.org> From: Shuah Khan Message-ID: Date: Wed, 28 Jun 2017 08:19:13 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170628111958.22405-1-fathi.boudra@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfNgZH18nHIaxru4QAyC2qcymYC8zrUtLxNMqKxgHZNxD5Hy4K2QW6jhlZyaZLvKcU42Ajn7yjezE/FY0q5o7/NPgOYgXejzvUikKCxaYyvS5x3ThOvDZ EEfpbekGrbo3+q8JC5xUVf0THli5b64gXQjjCrqUuK8xeZL3Uh+Mk7xiARNEd5fHyfv2w/Y6IPGOYiwyHfV+Qsjecm15d8sL9jE2rXO8YCS1nXIxI5Nfzmb7 bq480ccuoS/gtYKwABzFz8YzT4XCQ1ZkFu86m9ti+78czMaQT03DWZlEjN98Co+Ys1u711ydH79IvbbM0osQNQ== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1931 Lines: 44 On 06/28/2017 05:19 AM, Fathi Boudra wrote: > reuseport_bpf_numa fails to build with undefined reference: > > aarch64-linaro-linux-gcc > --sysroot=/build/tmp-rpb-glibc/sysroots/hikey -Wall > -Wl,--no-as-needed -O2 -g -I../../../../usr/include/ -Wl,-O1 > -Wl,--hash-style=gnu -Wl,--as-needed -lnuma reuseport_bpf_numa.c > -o > /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa > /tmp/ccfUuExT.o: In function `send_from_node': > /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:138: > undefined reference to `numa_run_on_node' > /tmp/ccfUuExT.o: In function `main': > /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:230: > undefined reference to `numa_available' > /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/net/reuseport_bpf_numa.c:233: > undefined reference to `numa_max_node' > > Use LDLIBS instead of LDFLAGS to properly link against libnuma. > > Signed-off-by: Fathi Boudra Did you try this on linux-ksefltest next? It has the fix for this. thanks, -- Shuah > --- > tools/testing/selftests/net/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile > index 35cbb4cba410..17c732a19c4c 100644 > --- a/tools/testing/selftests/net/Makefile > +++ b/tools/testing/selftests/net/Makefile > @@ -3,7 +3,7 @@ > CFLAGS = -Wall -Wl,--no-as-needed -O2 -g > CFLAGS += -I../../../../usr/include/ > > -reuseport_bpf_numa: LDFLAGS += -lnuma > +reuseport_bpf_numa: LDLIBS += -lnuma > > TEST_PROGS := run_netsocktests run_afpackettests test_bpf.sh netdevice.sh > TEST_GEN_FILES = socket >