Skip to contentSkip to conversation

: fixed cross-compilation for tools

PATCH In review Ihar Hrachyshka 1 participant 2 messages Mar 3, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : fixed cross-compilation for tools

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

---
 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
packages/nfs-utils/files/cross-compile.patch new file +56 -0
new file mode 100644
index 0000000..e297b29
@@ -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
packages/nfs-utils/nfs-utils_1.1.2.bb +2 -1
index 353eb57..7bff4f6 100644
@@ -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 \
    "
 
Signature · 1 line
1.6.2.rc2.22.g1d035
#1 lore raw

Seems to be another way to do it. Don't commit it as for now...

Quoted 94 lines · Ihar Hrachyshka

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

---
 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

packages/nfs-utils/files/cross-compile.patch new file +56 -0
new file mode 100644
index 0000000..e297b29
@@ -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
packages/nfs-utils/nfs-utils_1.1.2.bb +0 -0
index 353eb57..7bff4f6 100644
@@ -3,11 +3,12 @@ PRIORITY = "optional"

 SECTION = "console/network"
 LICENSE = "GPL"

packages/nfs-utils/nfs-utils_1.1.2.bb +1 -1
-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