Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752750AbdF1PMA (ORCPT ); Wed, 28 Jun 2017 11:12:00 -0400 Received: from resqmta-po-06v.sys.comcast.net ([96.114.154.165]:47160 "EHLO resqmta-po-06v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751619AbdF1PLp (ORCPT ); Wed, 28 Jun 2017 11:11:45 -0400 Reply-To: shuah@kernel.org Subject: Re: [PATCH 1/1] selftests: timers: use LDLIBS instead of LDFLAGS to link against libpthread To: Fathi Boudra Cc: linux-kselftest@vger.kernel.org, "linux-kernel@vger.kernel.org" , John Stultz , Denys Dmytriyenko , Shuah Khan References: <20170628091810.30484-1-fathi.boudra@linaro.org> <238b17a6-6284-eee3-4481-85d71c09b335@kernel.org> <48527cb0-319e-a964-43cb-08f64f4aaefa@kernel.org> From: Shuah Khan Message-ID: Date: Wed, 28 Jun 2017 09:11:33 -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: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Envelope: MS4wfJBKBwwUM3f4geHGQrUNaphSwfDijTf1oNC4yieV5PylOyPmuci2xpbZYJ6j1IaEbHOsBxPK4llF6cbZp6RGHvs4Gws2djEAT9Wm95zz4frjv+U+nFPm 6MNNY+Mu4KAwICA9esWqGtP2T7hUT9jqo5R1wECZ824773nALOtVAM/11ZfnMVfR1JEz79Gc8zvGoqNWO6RDAlKgadBst8Nm3sZYM0o9qdDBoWc+y0mRMk6P KllIHFKj+6FziP+OIHg6XE2DI0ksiP6fZMHU39jRBfhF2Hb3YVYBqR8wct+OQl/C9nO4iEPm5pUvCIiAChWnBP61w8LJYsb4CVYDoqIHh2Rp1qk8GEzm3Snf R6RXYGZG Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2595 Lines: 63 On 06/28/2017 09:00 AM, Fathi Boudra wrote: > On 28 June 2017 at 17:41, Shuah Khan wrote: >> On 06/28/2017 08:37 AM, Fathi Boudra wrote: >>> On 28 June 2017 at 17:20, Shuah Khan wrote: >>>> 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 >>>>> Signed-off-by: Fathi Boudra >>>> >>>> I can't reproduce this on linux-kselftest next on x86_64. Is this arm64 speocific >>>> problem? Please try this on linux-kselftest latest. >>> >>> yes, I tried linux-kselftest next and can reproduce. >>> Maybe related to native build vs cross-build? >>> I don't think it's arm64 specific. >>> >> >> Can you confirm that this change doesn't cause problems in native >> build environments. > > yes, I tested on x86 in native build environment as well. It builds > and run fine. > > I noticed my patchset for LDFLAGS vs LDLIBS changes don't apply > cleanly on linux-kselftest next branch. I'm happy to respin the serie > on top of next branch if you're willing to take them. > Yeah. I knew your series won't apply on top of linux-kselftest next just looking at that patches. Hence the question whether or not these problems have been reproduced on linux-kselftest. Please redo the patches. The net patch needs to be done on top of SeongJae Park's fix selftest/net/Makefile: Specify output with $(OUTPUT) btw - with the the above fix, I don't see any failures on x86_64. I am curious why it fails in cross-build? Could you figure out if your cross-build environment is good. thanks, -- Shuah thanks, -- Shuah