nfs-utils: use cross toolchain to compile testlk
cover nfs-utils: use cross toolchain to compile testlk
The following changes since commit c42df8cb48ceb6081680ffb802e85dad557cf29c:
i2c-tools: Add i2c-tools to the core (2014-05-28 09:42:14 +0100)
are available in the git repository at:
git://git.pokylinux.org/poky-contrib chonglu/nfs-utils
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=chonglu/nfs-utils
Chong Lu (1):
nfs-utils: use cross toolchain to compile testlk
.../nfs-utils-use-cross-toolchain-to-compile.patch | 26 ++++++++++++++++++++++ .../nfs-utils/nfs-utils_1.3.0.bb | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-use-cross-toolchain-to-compile.patch
Signature · 1 line
1.8.1.2
PATCH 1/1 nfs-utils: use cross toolchain to compile testlk
testlk is built with host gcc at do_compile stage, which leads to unrecognized some flags for special architecture. Using cross toolchain instead.
--- .../nfs-utils-use-cross-toolchain-to-compile.patch | 26 ++++++++++++++++++++++ .../nfs-utils/nfs-utils_1.3.0.bb | 3 ++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-use-cross-toolchain-to-compile.patch
meta/recipes-connectivity/nfs-utils/nfs-utils/nfs-utils-use-cross-toolchain-to-compile.patch new file +26 -0
@@ -0,0 +1,26 @@ +nfs-utils: use cross toolchain to compile testlk + +testlk is built with host gcc at do_compile stage, which leads to unrecognized +some flags for special architecture. Using cross toolchain instead. + +Upstream-Status: Pending + +Signed-off-by: Chong Lu <[email protected]> +--- + tools/locktest/Makefile.am | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am +index 3156815..87d0bac 100644 +--- a/tools/locktest/Makefile.am ++++ b/tools/locktest/Makefile.am +@@ -1,6 +1,5 @@ + ## Process this file with automake to produce Makefile.in + +-CC=$(CC_FOR_BUILD) + LIBTOOL = @LIBTOOL@ --tag=CC + + noinst_PROGRAMS = testlk +-- +1.7.9.5 +
meta/recipes-connectivity/nfs-utils/nfs-utils_1.3.0.bb +2 -1
@@ -28,7 +28,8 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/nfs-utils/${PV}/nfs-utils-${PV}.tar.x file://nfs-utils.conf \ file://nfs-server.service \ file://nfs-mountd.service \ - file://nfs-statd.service " + file://nfs-statd.service \ + file://nfs-utils-use-cross-toolchain-to-compile.patch" SRC_URI[md5sum] = "6e93a7997ca3a1eac56bf219adab72a8" SRC_URI[sha256sum] = "ab8384d0e487ed6a18c5380d5df28015f7dd98680bf08f3247c97d9f7d99e56f"
Signature · 1 line
1.8.1.2
Quoted 2 lines · Chong Lu
testlk is built with host gcc at
do_compilestage, which leads to unrecognized some flags for special architecture. Using cross toolchain instead.
The makefile explicitly uses the host compiler, so presumably there's a good reason for this. If the problem is that the host compiler is being passed target CFLAGS, then you should set AM_CFLAGS to CFLAGS_FOR_BUILD and so on.
Ross
Quoted 11 lines · Ross
Quoted 2 lines · Chong Lu
testlk is built with host gcc at
do_compilestage, which leads to unrecognized some flags for special architecture. Using cross toolchain instead.The makefile explicitly uses the host compiler, so presumably there's a good reason for this. If the problem is that the host compiler is being passed target CFLAGS, then you should set
AM_CFLAGStoCFLAGS_FOR_BUILDand so on.Ross
Hi Ross,
I remove "CC=$(CC_FOR_BUILD)" in order to inherit compiler.
Do you mean that I should reset CFLAGS in makefile rather than inherit compiler? If I reset CFLAGS, this makefile will use host compiler.
Moreover, testlk can't execute in target.
Best Regards
Chong
Quoted 5 lines · Chong Lu
I remove "CC=$(CC_FOR_BUILD)" in order to inherit compiler. Do you mean that I should reset CFLAGS in makefile rather than inherit compiler?
If I reset CFLAGS, this makefile will use host compiler. Moreover, testlk can't execute in target.
I just had a proper look and it *should* be working as they're also overriding CFLAGS. Then again this is a test program that isn't installed so instead of changing the makefile, why not just stop recursing into testlock?
Ross