Since libc is linked against libmachuser and libhurduser, they are implicitly linked against everything else on certain systems. On systems where implicit linking is disabled, a binary must explicitly link against each library from which it references symbols.
* auth/Makefile (OTHERLIBS): Explicitly link libmachuser and libhurduser. * boot/Makefile (OTHERLIBS): Likewise. * console/Makefile (OTHERLIBS): Likewise. * console-client/Makefile (console-LDLIBS): Likewise. * daemons/Makefile (console-run-LDLIBS): Likewise. * exec/Makefile (OTHERLIBS): Likewise. * fatfs/Makefile (OTHERLIBS): Likewise. * ftpfs/Makefile (OTHERLIBS): Likewise. * hostmux/Makefile (OTHERLIBS): Likewise. * init/Makefile (OTHERLIBS): Likewise. * nfsd/Makefile (OTHERLIBS): Likewise. * pfinet/Makefile (OTHERLIBS): Likewise. * pflocal/Makefile (OTHERLIBS): Likewise. * proc/Makefile (OTHERLIBS): Likewise. * term/Makefile (OTHERLIBS): Likewise. * tmpfs/Makefile (OTHERLIBS): Likewise. * trans/Makefile (crash-LDLIBS): Likewise. (fakeroot-LDLIBS): Likewise. (firmlink-LDLIBS): Likewise. (ifsock-LDLIBS): Likewise. (magic-LDLIBS): Likewise. (password-LDLIBS): Likewise. (symlink-LDLIBS): Likewise. * usermux/Makefile (OTHERLIBS): Likewise. * utils/Makefile (rpctrace-LDLIBS): Likewise. (vminfo-LDLIBS): Likewise. * fstests/Makefile (fstests-LDLIBS): Explicitly link libmachuser. * nfs/Makefile (OTHERLIBS): Likewise. * storeio/Makefile (OTHERLIBS): Likewise. * sutils/Makefile (swapoff-LDLIBS): Likewise. (swapon-LDLIBS): Likewise. * trans/Makefile (fifo-LDLIBS): Likewise. (fwd-LDLIBS): Likewise. (hello-LDLIBS): Likewise. (hello-mt-LDLIBS): Likewise. (new-fifo-LDLIBS): Likewise. (null-LDLIBS): Likewise. (proxy-defpager-LDLIBS): Likewise. (remap-LDLIBS): Likewise. (streamio-LDLIBS): Likewise. * ufs-utils/Makefile (mkfs-LDLIBS): Likewise. * utils/Makefile (dev-probe-LDLIBS): Likewise. (vmstat-LDLIBS): Likewise. * daemons/Makefile (mail.local-LDLIBS): Explicitly link libhurduser. * sutils/Makefile (fsck-LDLIBS): Likewise. * utils/Makefile (addauth-LDLIBS): Likewise. (fakeauth-LDLIBS): Likewise. (fsysopts-LDLIBS): Likewise. (gcore-LDLIBS): Likewise. (ids-LDLIBS): Likewise. (login-LDLIBS): Likewise. (mount-LDLIBS): Likewise. (msgport-LDLIBS): Likewise. (portinfo-LDLIBS): Likewise. (ps-LDLIBS): Likewise. (rmauth-LDLIBS): Likewise. (setauth-LDLIBS): Likewise. (settrans-LDLIBS): Likewise. (shd-LDLIBS): Likewise. (showtrans-LDLIBS): Likewise. (storeread-LDLIBS): Likewise. (syncfs-LDLIBS): Likewise. (unsu-LDLIBS): Likewise. (w-LDLIBS): Likewise. --- auth/Makefile | 2 +- boot/Makefile | 2 +- console-client/Makefile | 1 + console/Makefile | 2 +- daemons/Makefile | 2 ++ exec/Makefile | 2 +- fatfs/Makefile | 2 +- fstests/Makefile | 1 + ftpfs/Makefile | 2 +- hostmux/Makefile | 2 +- init/Makefile | 1 + nfs/Makefile | 2 +- nfsd/Makefile | 2 +- pfinet/Makefile | 2 +- pflocal/Makefile | 2 +- proc/Makefile | 2 +- storeio/Makefile | 2 +- sutils/Makefile | 3 +++ term/Makefile | 2 +- tmpfs/Makefile | 2 +- trans/Makefile | 17 ++++++++++++++++- ufs-utils/Makefile | 1 + usermux/Makefile | 2 +- utils/Makefile | 26 +++++++++++++++++++++++--- 24 files changed, 64 insertions(+), 20 deletions(-) diff --git a/auth/Makefile b/auth/Makefile index 75910c7..af15b55 100644 --- a/auth/Makefile +++ b/auth/Makefile @@ -23,7 +23,7 @@ SRCS = auth.c OBJS = auth.o authServer.o auth_replyUser.o target = auth HURDLIBS = ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser MIGSFLAGS = -imacros $(srcdir)/authmutations.h diff --git a/boot/Makefile b/boot/Makefile index 0d883b0..0adf900 100644 --- a/boot/Makefile +++ b/boot/Makefile @@ -28,7 +28,7 @@ UX-OBJS = mach-crt0.o uxboot.o sigvec.o syscall.o ux.o $(COMMON-OBJS) target = boot io-MIGSFLAGS=-DREPLY_PORTS HURDLIBS = store shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser include ../Makeconf diff --git a/console-client/Makefile b/console-client/Makefile index 69a7e37..14d27b8 100644 --- a/console-client/Makefile +++ b/console-client/Makefile @@ -40,6 +40,7 @@ HURDLIBS = cons ports netfs fshelp iohelp ihash shouldbeinlibc LDLIBS = -ldl -lpthread module-dir = $(libdir)/hurd/console console-LDFLAGS = -Wl,-E +console-LDLIBS = -lmachuser -lhurduser CPPFLAGS += -I$(CURDIR)/xkb -I$(srcdir)/xkb LFLAGS = -i diff --git a/console/Makefile b/console/Makefile index c5ab543..ce8882f 100644 --- a/console/Makefile +++ b/console/Makefile @@ -27,7 +27,7 @@ SRCS = console.c display.c pager.c input.c MIGSTUBS = notifyServer.o tioctlServer.o fs_notifyUser.o HURDLIBS = netfs fshelp iohelp pager ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser OBJS = $(sort $(SRCS:.c=.o) $(MIGSTUBS)) MIGSFLAGS += -imacros $(srcdir)/mutations.h diff --git a/daemons/Makefile b/daemons/Makefile index d16680e..be3f00f 100644 --- a/daemons/Makefile +++ b/daemons/Makefile @@ -28,6 +28,8 @@ installationdir = $(libexecdir) HURDLIBS = fshelp ports shouldbeinlibc OBJS = $(SRCS:.c=.o) getty-LDLIBS = -lutil +mail.local-LDLIBS = -lhurduser +console-run-LDLIBS = -lmachuser -lhurduser INSTALL-mail.local-ops = -o root -m 4755 diff --git a/exec/Makefile b/exec/Makefile index 3fc8273..fdee2ca 100644 --- a/exec/Makefile +++ b/exec/Makefile @@ -34,7 +34,7 @@ target = exec #targets = exec exec.static #OTHERLIBS = -lbfd -liberty HURDLIBS = trivfs fshelp iohelp ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser exec-MIGSFLAGS = -imacros $(srcdir)/execmutations.h diff --git a/fatfs/Makefile b/fatfs/Makefile index c673b1b..55a5c8d 100644 --- a/fatfs/Makefile +++ b/fatfs/Makefile @@ -23,7 +23,7 @@ SRCS = inode.c main.c dir.c pager.c fat.c virt-inode.c node-create.c OBJS = $(SRCS:.c=.o) HURDLIBS = diskfs iohelp fshelp store pager ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser include ../Makeconf diff --git a/fstests/Makefile b/fstests/Makefile index 961c57a..2bbd1b3 100644 --- a/fstests/Makefile +++ b/fstests/Makefile @@ -20,6 +20,7 @@ makemode := utilities SRCS = fstests.c fdtests.c timertest.c opendisk.c targets = timertest fstests # opendisk fdtests +fstests-LDLIBS = -lmachuser include ../Makeconf diff --git a/ftpfs/Makefile b/ftpfs/Makefile index 7039890..7da6498 100644 --- a/ftpfs/Makefile +++ b/ftpfs/Makefile @@ -25,6 +25,6 @@ SRCS = ftpfs.c fs.c host.c netfs.c dir.c conn.c ccache.c node.c ncache.c OBJS = $(SRCS:.c=.o) HURDLIBS = netfs fshelp iohelp ports ihash ftpconn shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser include ../Makeconf diff --git a/hostmux/Makefile b/hostmux/Makefile index 939a9f6..7268d97 100644 --- a/hostmux/Makefile +++ b/hostmux/Makefile @@ -25,6 +25,6 @@ SRCS = hostmux.c mux.c leaf.c node.c stubs.c OBJS = $(SRCS:.c=.o) HURDLIBS = netfs fshelp iohelp ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser include ../Makeconf diff --git a/init/Makefile b/init/Makefile index ffb82ff..8d2cd25 100644 --- a/init/Makefile +++ b/init/Makefile @@ -24,6 +24,7 @@ OBJS = $(SRCS:.c=.o) \ startup_notifyUser.o target = init HURDLIBS = shouldbeinlibc +OTHERLIBS = -lmachuser -lhurduser include ../Makeconf diff --git a/nfs/Makefile b/nfs/Makefile index d814f67..67d34b5 100644 --- a/nfs/Makefile +++ b/nfs/Makefile @@ -27,6 +27,6 @@ SRCS = ops.c rpc.c mount.c nfs.c cache.c consts.c main.c name-cache.c \ storage-info.c OBJS = $(SRCS:.c=.o) HURDLIBS = netfs fshelp iohelp ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser include ../Makeconf diff --git a/nfsd/Makefile b/nfsd/Makefile index daaf86e..45b200d 100644 --- a/nfsd/Makefile +++ b/nfsd/Makefile @@ -25,7 +25,7 @@ OBJS = $(subst .c,.o,$(SRCS)) target = nfsd installationdir = $(sbindir) HURDLIBS = shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser include ../Makeconf diff --git a/pfinet/Makefile b/pfinet/Makefile index d442629..0edfcdc 100644 --- a/pfinet/Makefile +++ b/pfinet/Makefile @@ -115,7 +115,7 @@ ASMHEADERS = atomic.h bitops.h byteorder.h delay.h errno.h hardirq.h init.h \ segment.h spinlock.h system.h types.h uaccess.h HURDLIBS=trivfs fshelp ports ihash shouldbeinlibc iohelp -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser target = pfinet diff --git a/pflocal/Makefile b/pflocal/Makefile index bfc2f4e..5ce4aea 100644 --- a/pflocal/Makefile +++ b/pflocal/Makefile @@ -26,7 +26,7 @@ SRCS = connq.c io.c pflocal.c socket.c pf.c sock.c sserver.c MIGSTUBS = ioServer.o socketServer.o OBJS = $(SRCS:.c=.o) $(MIGSTUBS) HURDLIBS = pipe trivfs iohelp fshelp ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h diff --git a/proc/Makefile b/proc/Makefile index 2eed13c..6b9ce1d 100644 --- a/proc/Makefile +++ b/proc/Makefile @@ -32,7 +32,7 @@ MIGSTUBS = processServer.o notifyServer.o \ ourmsgUser.o proc_excUser.o proc_excServer.o OBJS = $(SRCS:.c=.o) $(MIGSTUBS) HURDLIBS = ihash ports shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser include ../Makeconf diff --git a/storeio/Makefile b/storeio/Makefile index c131758..3f44565 100644 --- a/storeio/Makefile +++ b/storeio/Makefile @@ -24,6 +24,6 @@ SRCS = dev.c storeio.c open.c pager.c io.c OBJS = $(SRCS:.c=.o) HURDLIBS = trivfs pager fshelp iohelp store ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser include ../Makeconf diff --git a/sutils/Makefile b/sutils/Makefile index 773a7da..e9f818f 100644 --- a/sutils/Makefile +++ b/sutils/Makefile @@ -29,6 +29,9 @@ SRCS = $(progs:=.c) clookup.c fstab.c update.c $(scripts:=.sh) OBJS = $(progs:=.c) HURDLIBS = store shouldbeinlibc +fsck-LDLIBS = -lhurduser +swapoff-LDLIBS = -lmachuser +swapon-LDLIBS = -lmachuser include ../Makeconf diff --git a/term/Makefile b/term/Makefile index 025a9b3..bab1b24 100644 --- a/term/Makefile +++ b/term/Makefile @@ -26,7 +26,7 @@ target = term SRCS = devio.c munge.c users.c main.c ptyio.c hurdio.c xinl.c HURDLIBS = trivfs fshelp iohelp ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser OBJS = $(subst .c,.o,$(SRCS)) termServer.o device_replyServer.o tioctlServer.o ourmsgUser.o include ../Makeconf diff --git a/tmpfs/Makefile b/tmpfs/Makefile index fdcae34..27d2ca4 100644 --- a/tmpfs/Makefile +++ b/tmpfs/Makefile @@ -24,6 +24,6 @@ SRCS = tmpfs.c node.c dir.c pager-stubs.c OBJS = $(SRCS:.c=.o) default_pagerUser.o # XXX The shared libdiskfs requires libstore even though we don't use it here. HURDLIBS = diskfs pager iohelp fshelp store ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser include ../Makeconf diff --git a/trans/Makefile b/trans/Makefile index b3210b6..2feb46f 100644 --- a/trans/Makefile +++ b/trans/Makefile @@ -30,7 +30,22 @@ OBJS = $(SRCS:.c=.o) fsysServer.o ifsockServer.o passwordServer.o \ device_replyServer.o elfcore.o HURDLIBS = ports netfs trivfs iohelp fshelp pipe ihash shouldbeinlibc LDLIBS += -lpthread -password-LDLIBS = $(LIBCRYPT) +crash-LDLIBS = -lmachuser -lhurduser +fakeroot-LDLIBS = -lmachuser -lhurduser +fifo-LDLIBS = -lmachuser +firmlink-LDLIBS = -lmachuser -lhurduser +fwd-LDLIBS = -lmachuser +hello-LDLIBS = -lmachuser +hello-mt-LDLIBS = -lmachuser +ifsock-LDLIBS = -lmachuser -lhurduser +magic-LDLIBS = -lmachuser -lhurduser +new-fifo-LDLIBS = -lmachuser +null-LDLIBS = -lmachuser +password-LDLIBS = $(LIBCRYPT) -lmachuser -lhurduser +proxy-defpager-LDLIBS = -lmachuser +remap-LDLIBS = -lmachuser +streamio-LDLIBS = -lmachuser +symlink-LDLIBS = -lmachuser -lhurduser include ../Makeconf diff --git a/ufs-utils/Makefile b/ufs-utils/Makefile index df22440..d31622c 100644 --- a/ufs-utils/Makefile +++ b/ufs-utils/Makefile @@ -28,6 +28,7 @@ installationdir = $(sbindir) OBJS = $(SRCS:.c=.o) HURDLIBS = store shouldbeinlibc +mkfs-LDLIBS = -lmachuser include ../Makeconf diff --git a/usermux/Makefile b/usermux/Makefile index c30b5ab..d8df228 100644 --- a/usermux/Makefile +++ b/usermux/Makefile @@ -25,6 +25,6 @@ SRCS = usermux.c mux.c leaf.c node.c stubs.c OBJS = $(SRCS:.c=.o) HURDLIBS = netfs fshelp iohelp ports ihash shouldbeinlibc -OTHERLIBS = -lpthread +OTHERLIBS = -lpthread -lmachuser -lhurduser include ../Makeconf diff --git a/utils/Makefile b/utils/Makefile index e2388f5..125014d 100644 --- a/utils/Makefile +++ b/utils/Makefile @@ -33,9 +33,29 @@ SRCS = shd.c ps.c settrans.c syncfs.c showtrans.c addauth.c rmauth.c \ OBJS = $(filter-out %.sh,$(SRCS:.c=.o)) HURDLIBS = ps ihash store fshelp ports ftpconn shouldbeinlibc LDLIBS += -lpthread -login-LDLIBS = -lutil $(LIBCRYPT) -addauth-LDLIBS = $(LIBCRYPT) -setauth-LDLIBS = $(LIBCRYPT) +addauth-LDLIBS = $(LIBCRYPT) -lhurduser +devprobe-LDLIBS = -lmachuser +fakeauth-LDLIBS = -lhurduser +fsysopts-LDLIBS = -lhurduser +gcore-LDLIBS = -lhurduser +ids-LDLIBS = -lhurduser +login-LDLIBS = $(LIBCRYPT) -lutil -lhurduser +mount-LDLIBS = -lhurduser +msgport-LDLIBS = -lhurduser +portinfo-LDLIBS = -lhurduser +ps-LDLIBS = -lhurduser +rmauth-LDLIBS = -lhurduser +rpctrace-LDLIBS = -lmachuser -lhurduser +setauth-LDLIBS = $(LIBCRYPT) -lhurduser +settrans-LDLIBS = -lhurduser +shd-LDLIBS = -lhurduser +showtrans-LDLIBS = -lhurduser +storeread-LDLIBS = -lhurduser +syncfs-LDLIBS = -lhurduser +unsu-LDLIBS = -lhurduser +vminfo-LDLIBS = -lmachuser -lhurduser +vmstat-LDLIBS = -lmachuser +w-LDLIBS = -lhurduser INSTALL-login-ops = -o root -m 4755 INSTALL-ids-ops = -o root -m 4755 -- 1.8.1.4