Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1676709
| From | Shuah Khan <shuah@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/1] selftests: timers: use LDLIBS instead of LDFLAGS to link against libpthread |
| Date | 2017-06-28 16:30 +0200 |
| Message-ID | <tXm8F-7TU-5@gated-at.bofh.it> (permalink) |
| References | <tXhiH-4WZ-23@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 06/28/2017 03:18 AM, Fathi Boudra wrote: > timers test fails to build due to undefined reference: > > aarch64-linaro-linux-gcc --sysroot=/build/tmp-rpb-glibc/sysroots/hikey > -O2 -pipe -g -feliminate-unused-debug-types -O3 -Wl,-no-as-needed -Wall > -DKTEST -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -lrt -lpthread > posix_timers.c > -o /build/tmp-rpb-glibc/work/hikey-linaro-linux/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers > /tmp/cc1FTZzT.o: In function `check_timer_create': > /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers.c:157: > undefined reference to `timer_create' > /usr/src/debug/kselftests/4.12-r0/linux-4.12-rc7/tools/testing/selftests/timers/posix_timers.c:170: > undefined reference to `timer_settime' > collect2: error: ld returned 1 exit status > > Use LDLIBS instead of LDFLAGS to properly link against libpthread and fix > this build issue. > > Signed-off-by: Denys Dmytriyenko <denys@ti.com> > Signed-off-by: Fathi Boudra <fathi.boudra@linaro.org> I can't reproduce this on linux-kselftest next on x86_64. Is this arm64 speocific problem? Please try this on linux-kselftest latest. thanks, -- Shuah > --- > tools/testing/selftests/timers/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/timers/Makefile b/tools/testing/selftests/timers/Makefile > index 5fa1d7e9a915..f48d7ca9d9b1 100644 > --- a/tools/testing/selftests/timers/Makefile > +++ b/tools/testing/selftests/timers/Makefile > @@ -1,6 +1,6 @@ > BUILD_FLAGS = -DKTEST > CFLAGS += -O3 -Wl,-no-as-needed -Wall $(BUILD_FLAGS) > -LDFLAGS += -lrt -lpthread > +LDLIBS += -lrt -lpthread > > # these are all "safe" tests that don't modify > # system time or require escalated privileges >
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 1/1] selftests: timers: use LDLIBS instead of LDFLAGS to link against libpthread Fathi Boudra <fathi.boudra@linaro.org> - 2017-06-28 11:20 +0200
Re: [PATCH 1/1] selftests: timers: use LDLIBS instead of LDFLAGS to link against libpthread Shuah Khan <shuah@kernel.org> - 2017-06-28 16:30 +0200
Re: [PATCH 1/1] selftests: timers: use LDLIBS instead of LDFLAGS to link against libpthread Fathi Boudra <fathi.boudra@linaro.org> - 2017-06-28 16:40 +0200
Re: [PATCH 1/1] selftests: timers: use LDLIBS instead of LDFLAGS to link against libpthread Shuah Khan <shuah@kernel.org> - 2017-06-28 16:50 +0200
Re: [PATCH 1/1] selftests: timers: use LDLIBS instead of LDFLAGS to link against libpthread Fathi Boudra <fathi.boudra@linaro.org> - 2017-06-28 17:10 +0200
Re: [PATCH 1/1] selftests: timers: use LDLIBS instead of LDFLAGS to link against libpthread Shuah Khan <shuah@kernel.org> - 2017-06-28 17:20 +0200
Re: [PATCH 1/1] selftests: timers: use LDLIBS instead of LDFLAGS to link against libpthread Fathi Boudra <fathi.boudra@linaro.org> - 2017-06-28 18:00 +0200
Re: [PATCH 1/1] selftests: timers: use LDLIBS instead of LDFLAGS to link against libpthread Denys Dmytriyenko <denys@ti.com> - 2017-06-28 18:10 +0200
csiph-web