2009-03-03 17:49:27

by Ihar Hrachyshka

[permalink] [raw]
Subject: [PATCH] Fixed cross-compilation of nfs-utils tools.

Build nfs-utils tools with compiler defined by ./configure script.
---
tools/locktest/Makefile.am | 4 ----
tools/rpcdebug/Makefile.am | 4 ----
tools/rpcgen/Makefile.am | 5 -----
3 files changed, 0 insertions(+), 13 deletions(-)

diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am
index 3156815..e89fbad 100644
--- a/tools/locktest/Makefile.am
+++ b/tools/locktest/Makefile.am
@@ -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 --git a/tools/rpcdebug/Makefile.am b/tools/rpcdebug/Makefile.am
index 39b70c9..c627b01 100644
--- a/tools/rpcdebug/Makefile.am
+++ b/tools/rpcdebug/Makefile.am
@@ -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 @@ EXTRA_DIST = $(man8_MANS)

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 --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
index 51a2bfa..fc75108 100644
--- a/tools/rpcgen/Makefile.am
+++ b/tools/rpcgen/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 = rpcgen
@@ -9,10 +8,6 @@ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c rpc_hout.c rpc_main.c \
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
--
1.5.6.3



2009-03-03 18:04:06

by Chuck Lever III

[permalink] [raw]
Subject: Re: [PATCH] Fixed cross-compilation of nfs-utils tools.

On Mar 3, 2009, at Mar 3, 2009, 12:49 PM, Ihar Hrachyshka wrote:
> Build nfs-utils tools with compiler defined by ./configure script.

In the patch description, can you provide some information about the
problem you encountered?

> ---
> tools/locktest/Makefile.am | 4 ----
> tools/rpcdebug/Makefile.am | 4 ----
> tools/rpcgen/Makefile.am | 5 -----
> 3 files changed, 0 insertions(+), 13 deletions(-)
>
> diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am
> index 3156815..e89fbad 100644
> --- a/tools/locktest/Makefile.am
> +++ b/tools/locktest/Makefile.am
> @@ -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 --git a/tools/rpcdebug/Makefile.am b/tools/rpcdebug/Makefile.am
> index 39b70c9..c627b01 100644
> --- a/tools/rpcdebug/Makefile.am
> +++ b/tools/rpcdebug/Makefile.am
> @@ -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 @@ EXTRA_DIST = $(man8_MANS)
>
> 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 --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
> index 51a2bfa..fc75108 100644
> --- a/tools/rpcgen/Makefile.am
> +++ b/tools/rpcgen/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 = rpcgen
> @@ -9,10 +8,6 @@ rpcgen_SOURCES = rpc_clntout.c rpc_cout.c
> rpc_hout.c rpc_main.c \
> 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)
> -

Are you sure rpcgen should be built for the target system? rpcgen
only needs to run on the build system; it's not installed on the
target, as far as I know. The rpcgen on my systems are from glibc-
common.

>
> MAINTAINERCLEANFILES = Makefile.in
>
> EXTRA_DIST = rpcgen.new.1

--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com

2009-03-03 18:31:29

by Ihar Hrachyshka

[permalink] [raw]
Subject: Re: [PATCH] Fixed cross-compilation of nfs-utils tools.

Hm, it seems that the problem is not in nfs-utils though in my cross
build system - OpenEmbedded. Sorry for noise.

On Tue, Mar 3, 2009 at 8:03 PM, Chuck Lever <[email protected]> wr=
ote:
> On Mar 3, 2009, at Mar 3, 2009, 12:49 PM, Ihar Hrachyshka wrote:
>>
>> Build nfs-utils tools with compiler defined by ./configure script.
>
> In the patch description, can you provide some information about the =
problem
> you encountered?
>
>> ---
>> tools/locktest/Makefile.am | =C2=A0 =C2=A04 ----
>> tools/rpcdebug/Makefile.am | =C2=A0 =C2=A04 ----
>> tools/rpcgen/Makefile.am =C2=A0 | =C2=A0 =C2=A05 -----
>> 3 files changed, 0 insertions(+), 13 deletions(-)
>>
>> diff --git a/tools/locktest/Makefile.am b/tools/locktest/Makefile.am
>> index 3156815..e89fbad 100644
>> --- a/tools/locktest/Makefile.am
>> +++ b/tools/locktest/Makefile.am
>> @@ -1,12 +1,8 @@
>> ## Process this file with automake to produce Makefile.in
>>
>> -CC=3D$(CC_FOR_BUILD)
>> LIBTOOL =3D @LIBTOOL@ --tag=3DCC
>>
>> noinst_PROGRAMS =3D testlk
>> testlk_SOURCES =3D testlk.c
>> -testlk_CFLAGS=3D$(CFLAGS_FOR_BUILD)
>> -testlk_CPPFLAGS=3D$(CPPFLAGS_FOR_BUILD)
>> -testlk_LDFLAGS=3D$(LDFLAGS_FOR_BUILD)
>>
>> MAINTAINERCLEANFILES =3D Makefile.in
>> diff --git a/tools/rpcdebug/Makefile.am b/tools/rpcdebug/Makefile.am
>> index 39b70c9..c627b01 100644
>> --- a/tools/rpcdebug/Makefile.am
>> +++ b/tools/rpcdebug/Makefile.am
>> @@ -1,6 +1,5 @@
>> ## Process this file with automake to produce Makefile.in
>>
>> -CC=3D$(CC_FOR_BUILD)
>> LIBTOOL =3D @LIBTOOL@ --tag=3DCC
>>
>> man8_MANS =3D rpcdebug.man
>> @@ -8,8 +7,5 @@ EXTRA_DIST =3D $(man8_MANS)
>>
>> sbin_PROGRAMS =3D rpcdebug
>> rpcdebug_SOURCES =3D rpcdebug.c
>> -rpcdebug_CFLAGS=3D$(CFLAGS_FOR_BUILD)
>> -rpcdebug_CPPFLAGS=3D$(CPPFLAGS_FOR_BUILD) -I$(top_srcdir)/support/i=
nclude
>> -rpcdebug_LDFLAGS=3D$(LDFLAGS_FOR_BUILD)
>>
>> MAINTAINERCLEANFILES =3D Makefile.in
>> diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
>> index 51a2bfa..fc75108 100644
>> --- a/tools/rpcgen/Makefile.am
>> +++ b/tools/rpcgen/Makefile.am
>> @@ -1,6 +1,5 @@
>> ## Process this file with automake to produce Makefile.in
>>
>> -CC=3D$(CC_FOR_BUILD)
>> LIBTOOL =3D @LIBTOOL@ --tag=3DCC
>>
>> noinst_PROGRAMS =3D rpcgen
>> @@ -9,10 +8,6 @@ rpcgen_SOURCES =3D rpc_clntout.c rpc_cout.c rpc_hou=
t.c
>> rpc_main.c \
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 rpc_util.c r=
pc_sample.c rpc_output.h rpc_parse.h \
>> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 rpc_scan.h r=
pc_util.h
>>
>> -rpcgen_CFLAGS=3D$(CFLAGS_FOR_BUILD)
>> -rpcgen_CPPLAGS=3D$(CPPFLAGS_FOR_BUILD)
>> -rpcgen_LDFLAGS=3D$(LDFLAGS_FOR_BUILD)
>> -
>
> Are you sure rpcgen should be built for the target system? =C2=A0rpcg=
en only
> needs to run on the build system; it's not installed on the target, a=
s far
> as I know. =C2=A0The rpcgen on my systems are from glibc-common.
>
>>
>> MAINTAINERCLEANFILES =3D Makefile.in
>>
>> EXTRA_DIST =3D rpcgen.new.1
>
> --
> Chuck Lever
> chuck[dot]lever[at]oracle[dot]com
>