[PATCH 2/2] libc/inet/rpc/Makefile.in: Move INET_RPC_{DIR, OUT} before CSRC_ALL

Markos Chandras markos.chandras at gmail.com
Thu Feb 7 12:38:45 UTC 2013


From: Markos Chandras <markos.chandras at imgtec.com>

A regression introduced in 1b3025b7352f5e432ffa1c7adc57085ac9092b77
"buildsys: switch libc to kbuild-style"

leading to the following linking problems:
libc/libc_so.a(rpc_thread.oS): In function __rpc_thread_svc_max_pollfd':
rpc_thread.c:(.text+0x148): undefined reference to svc_max_pollfd'
libc/libc_so.a(rpc_thread.oS): In function __rpc_thread_svc_pollfd':
rpc_thread.c:(.text+0x184): undefined reference to svc_pollfd'

The CSRC_ALL variable uses the INET_RPC_DIR variable which is
initialized later on. We fix this problem by moving the
INET_RCP_{DIR,OUT} definitions before we use them in CSRC_ALL

Signed-off-by: Markos Chandras <markos.chandras at imgtec.com>
---
 libc/inet/rpc/Makefile.in | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libc/inet/rpc/Makefile.in b/libc/inet/rpc/Makefile.in
index 481961d..65afc53 100644
--- a/libc/inet/rpc/Makefile.in
+++ b/libc/inet/rpc/Makefile.in
@@ -18,15 +18,16 @@ CSRC_NFS = authunix_prot.c auth_none.c auth_unix.c bindresvport.c \
 	rpc_prot.c rpc_thread.c rtime.c ruserpass.c sa_len.c \
 	svc.c svc_auth.c svc_authux.c \
 	xdr.c xdr_array.c xdr_mem.c xdr_rec.c xdr_reference.c
+
+INET_RPC_DIR:=$(top_srcdir)libc/inet/rpc
+INET_RPC_OUT:=$(top_builddir)libc/inet/rpc
+
 CSRC_ALL = $(notdir $(wildcard $(INET_RPC_DIR)/*.c))
 CSRC-y := $(if $(UCLIBC_HAS_FULL_RPC),$(CSRC_ALL),$(CSRC_NFS))
 # rpc_thread.oS is better, because the header adds unneeded references
 # to __pthread_internal_tsd*
 CSRC-y := $(filter-out rpc_thread.c,$(CSRC-y))
 
-INET_RPC_DIR:=$(top_srcdir)libc/inet/rpc
-INET_RPC_OUT:=$(top_builddir)libc/inet/rpc
-
 INET_RPC_SRC:=$(patsubst %.c,$(INET_RPC_DIR)/%.c,$(CSRC-y))
 INET_RPC_OBJ:=$(patsubst %.c,$(INET_RPC_OUT)/%.o,$(CSRC-y))
 
-- 
1.8.1.2




More information about the uClibc mailing list