All of lore.kernel.org
 help / color / mirror / Atom feed
* [nfs-utils PATCH] tools: rpcgen: use host instead of cross compiler
@ 2020-10-21 10:28 Bastian Krause
  2020-10-21 10:46 ` Giulio Benetti
  0 siblings, 1 reply; 3+ messages in thread
From: Bastian Krause @ 2020-10-21 10:28 UTC (permalink / raw)
  To: linux-nfs; +Cc: Giulio Benetti, Steve Dickson, kernel, Bastian Krause

When cross compiling rpcgen is compiled with the cross compiler although
it is executed during compile time only. This leads to errors like:

  ../../tools/rpcgen/rpcgen -l -o mount_clnt.c mount.x
  ../../tools/rpcgen/rpcgen -c -i 0 -o mount_xdr.c mount.x
  ../../tools/rpcgen/rpcgen -h -o mount.h mount.x
  /lib/ld-linux-armhf.so.3: No such file or directory
  /lib/ld-linux-armhf.so.3: No such file or directory
  /lib/ld-linux-armhf.so.3: No such file or directory

Since e61775d1 ("rpcgen: bump to latest version") rpcgen is compiled
with the target compiler, prior to that it was correctly compiled with
the host compiler. Fix that by using $(CC_FOR_BUILD) as CC explicitly as
it was before.

buildroot works around this by compiling a host version first, then a
target version --with-rpcgen=$(HOST_DIR)/bin/rpcgen [1]. That does not
look like it is intended by nfs-utils.

[1] https://git.busybox.net/buildroot/tree/package/nfs-utils/nfs-utils.mk#n25

Signed-off-by: Bastian Krause <bst@pengutronix.de>
---
 tools/rpcgen/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/rpcgen/Makefile.am b/tools/rpcgen/Makefile.am
index 457cd507..f122cd9d 100644
--- a/tools/rpcgen/Makefile.am
+++ b/tools/rpcgen/Makefile.am
@@ -1,5 +1,7 @@
 CLEANFILES = *~
 
+CC=$(CC_FOR_BUILD)
+
 bin_PROGRAMS = rpcgen
 man_MANS = rpcgen.1
 
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-21 11:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 10:28 [nfs-utils PATCH] tools: rpcgen: use host instead of cross compiler Bastian Krause
2020-10-21 10:46 ` Giulio Benetti
     [not found]   ` <056bd6a6-9630-bda2-e16d-2f8f31c4bedb@pengutronix.de>
     [not found]     ` <d420b69b-6ab6-59ef-0be8-79b688cac027@benettiengineering.com>
2020-10-21 11:46       ` Bastian Krause

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.