[oe] [PATCH] [nfs-utils]: fixed cross-compilation for tools

Ihar Hrachyshka ihar.hrachyshka at gmail.com
Tue Mar 3 18:09:27 UTC 2009


Fixed a mess with CFLAGS, CC_FOR_BUILD and other stuff: this patch
forces compilation of tools/ stuff with compiler defined by ./configure

Signed-off-by: Ihar Hrachyshka <ihar.hrachyshka at gmail.com>
---
 packages/nfs-utils/files/cross-compile.patch |   56 ++++++++++++++++++++++++++
 packages/nfs-utils/nfs-utils_1.1.2.bb        |    3 +-
 2 files changed, 58 insertions(+), 1 deletions(-)
 create mode 100644 packages/nfs-utils/files/cross-compile.patch

diff --git a/packages/nfs-utils/files/cross-compile.patch b/packages/nfs-utils/files/cross-compile.patch
new file mode 100644
index 0000000..e297b29
--- /dev/null
+++ b/packages/nfs-utils/files/cross-compile.patch
@@ -0,0 +1,56 @@
+diff -urN nfs-utils-1.1.2.orig/tools/locktest/Makefile.am nfs-utils-1.1.2/tools/locktest/Makefile.am
+--- nfs-utils-1.1.2.orig/tools/locktest/Makefile.am	2009-03-03 17:33:48.000000000 +0200
++++ nfs-utils-1.1.2/tools/locktest/Makefile.am	2009-03-03 18:12:59.000000000 +0200
+@@ -1,12 +1,8 @@
+ ## Process this file with automake to produce Makefile.in
+ 
+-CC=$(CC_FOR_BUILD)
+ LIBTOOL = @LIBTOOL@ --tag=CC
+ 
+ noinst_PROGRAMS = testlk
+ testlk_SOURCES = testlk.c
+-testlk_CFLAGS=$(CFLAGS_FOR_BUILD)
+-testlk_CPPFLAGS=$(CPPFLAGS_FOR_BUILD)
+-testlk_LDFLAGS=$(LDFLAGS_FOR_BUILD)
+ 
+ MAINTAINERCLEANFILES = Makefile.in
+diff -urN nfs-utils-1.1.2.orig/tools/rpcdebug/Makefile.am nfs-utils-1.1.2/tools/rpcdebug/Makefile.am
+--- nfs-utils-1.1.2.orig/tools/rpcdebug/Makefile.am	2009-03-03 17:33:48.000000000 +0200
++++ nfs-utils-1.1.2/tools/rpcdebug/Makefile.am	2009-03-03 18:30:27.000000000 +0200
+@@ -1,6 +1,5 @@
+ ## Process this file with automake to produce Makefile.in
+ 
+-CC=$(CC_FOR_BUILD)
+ LIBTOOL = @LIBTOOL@ --tag=CC
+ 
+ man8_MANS = rpcdebug.man
+@@ -8,8 +7,5 @@
+ 
+ sbin_PROGRAMS = rpcdebug
+ rpcdebug_SOURCES = rpcdebug.c
+-rpcdebug_CFLAGS=$(CFLAGS_FOR_BUILD)
+-rpcdebug_CPPFLAGS=$(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/include
+-rpcdebug_LDFLAGS=$(LDFLAGS_FOR_BUILD)
+ 
+ MAINTAINERCLEANFILES = Makefile.in
+diff -urN nfs-utils-1.1.2.orig/tools/rpcgen/Makefile.am nfs-utils-1.1.2/tools/rpcgen/Makefile.am
+--- nfs-utils-1.1.2.orig/tools/rpcgen/Makefile.am	2009-03-03 17:33:48.000000000 +0200
++++ nfs-utils-1.1.2/tools/rpcgen/Makefile.am	2009-03-03 18:13:10.000000000 +0200
+@@ -1,6 +1,5 @@
+ ## Process this file with automake to produce Makefile.in
+ 
+-CC=$(CC_FOR_BUILD)
+ LIBTOOL = @LIBTOOL@ --tag=CC
+ 
+ noinst_PROGRAMS = rpcgen
+@@ -9,10 +8,6 @@
+ 		 rpc_util.c rpc_sample.c rpc_output.h rpc_parse.h \
+ 		 rpc_scan.h rpc_util.h
+ 
+-rpcgen_CFLAGS=$(CFLAGS_FOR_BUILD)
+-rpcgen_CPPLAGS=$(CPPFLAGS_FOR_BUILD)
+-rpcgen_LDFLAGS=$(LDFLAGS_FOR_BUILD)
+-
+ MAINTAINERCLEANFILES = Makefile.in
+ 
+ EXTRA_DIST = rpcgen.new.1
diff --git a/packages/nfs-utils/nfs-utils_1.1.2.bb b/packages/nfs-utils/nfs-utils_1.1.2.bb
index 353eb57..7bff4f6 100644
--- a/packages/nfs-utils/nfs-utils_1.1.2.bb
+++ b/packages/nfs-utils/nfs-utils_1.1.2.bb
@@ -3,11 +3,12 @@ PRIORITY = "optional"
 SECTION = "console/network"
 LICENSE = "GPL"
 
-PR = "3"
+PR = "4"
 
 DEPENDS = "e2fsprogs-libs tcp-wrappers libevent"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/nfs/nfs-utils-${PV}.tar.gz \
+	file://cross-compile.patch;patch=1 \
 	file://nfsserver \
    "
 
-- 
1.6.2.rc2.22.g1d035





More information about the Openembedded-devel mailing list