summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2015-12-31 17:49:25 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2015-12-31 21:47:32 +0100
commita70c7531ed3a6378dd527da005a1fe63fbb4871a (patch)
tree0e69277ce4fa708b9ee31cfbbc8ffc35a064d770
parent8058ef787e82504d0b6fab9384f1b74f72393f1a (diff)
Drop OTHERLIBS and use LDLIBS exclusively
When cross-compiling, OTHERLIBS magically turns -lpthread into the path to the host libpthread.so file, resulting in build issues. LDLIBS does not suffer from this problem and it seems that is already being used in other Makefiles. This patch removes OTHERLIBS entirely from the build system. * Makeconf: Remove references to OTHERLIBS * auth/Makefile: Replace OTHERLIBS with LDLIBS. * boot/Makefile: Likewise. * console/Makefile: Likewise. * exec/Makefile: Likewise. * ext2fs/Makefile: Likewise. * fatfs/Makefile: Likewise. * ftpfs/Makefile: Likewise. * hostmux/Makefile: Likewise. * isofs/Makefile: Likewise. * libhurd-slab/Makefile: Likewise. * nfs/Makefile: Likewise. * nfsd/Makefile: Likewise. * pfinet/Makefile: Likewise. * proc/Makefile: Likewise. * procfs/Makefile: Likewise. * random/Makefile: Likewise. * storeio/Makefile: Likewise. * term/Makefile: Likewise. * tmpfs/Makefile: Likewise. * usermux/Makefile: Likewise.
-rw-r--r--Makeconf3
-rw-r--r--auth/Makefile2
-rw-r--r--boot/Makefile2
-rw-r--r--console/Makefile2
-rw-r--r--exec/Makefile2
-rw-r--r--ext2fs/Makefile2
-rw-r--r--fatfs/Makefile2
-rw-r--r--ftpfs/Makefile2
-rw-r--r--hostmux/Makefile2
-rw-r--r--isofs/Makefile2
-rw-r--r--libhurd-slab/Makefile2
-rw-r--r--mach-defpager/Makefile2
-rw-r--r--nfs/Makefile2
-rw-r--r--nfsd/Makefile2
-rw-r--r--pfinet/Makefile2
-rw-r--r--pflocal/Makefile2
-rw-r--r--proc/Makefile3
-rw-r--r--procfs/Makefile2
-rw-r--r--random/Makefile2
-rw-r--r--storeio/Makefile2
-rw-r--r--term/Makefile2
-rw-r--r--tmpfs/Makefile2
-rw-r--r--usermux/Makefile2
23 files changed, 23 insertions, 25 deletions
diff --git a/Makeconf b/Makeconf
index dc435db1..8e24fc44 100644
--- a/Makeconf
+++ b/Makeconf
@@ -36,7 +36,6 @@
# Types `server' and `utility' should define
# target (the name of the program built)
-# OTHERLIBS (all libraries used)
# Types `servers' and `utilities' should define
# targets (the names of all the programs built)
@@ -309,7 +308,7 @@ $(installationdirlist): %:
ifneq ($(makemode),misc)
ifeq ($(doinst),one)
-$(linktarg): $(OBJS) $(OTHERLIBS) $(library_deps)
+$(linktarg): $(OBJS) $(library_deps)
endif
# Determine which sort of library we should link against from whether -static
diff --git a/auth/Makefile b/auth/Makefile
index b9eedda5..b82de074 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
+LDLIBS = -lpthread
MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h
diff --git a/boot/Makefile b/boot/Makefile
index 0afdb43b..c8772950 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
+LDLIBS += -lpthread
include ../Makeconf
diff --git a/console/Makefile b/console/Makefile
index c5ab543e..c2294070 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
+LDLIBS = -lpthread
OBJS = $(sort $(SRCS:.c=.o) $(MIGSTUBS))
MIGSFLAGS += -imacros $(srcdir)/mutations.h
diff --git a/exec/Makefile b/exec/Makefile
index d332f360..24062037 100644
--- a/exec/Makefile
+++ b/exec/Makefile
@@ -27,7 +27,7 @@ OBJS = main.o hostarch.o exec.o hashexec.o \
target = exec
#targets = exec exec.static
HURDLIBS = trivfs fshelp iohelp ports ihash shouldbeinlibc
-OTHERLIBS = -lpthread
+LDLIBS = -lpthread
exec-MIGSFLAGS = -imacros $(srcdir)/execmutations.h
exec_startup-MIGSFLAGS = -imacros $(srcdir)/execmutations.h
diff --git a/ext2fs/Makefile b/ext2fs/Makefile
index 8d2e68c7..88f8f465 100644
--- a/ext2fs/Makefile
+++ b/ext2fs/Makefile
@@ -24,7 +24,7 @@ SRCS = balloc.c dir.c ext2fs.c getblk.c hyper.c ialloc.c \
inode.c pager.c pokel.c truncate.c storeinfo.c msg.c xinl.c
OBJS = $(SRCS:.c=.o)
HURDLIBS = diskfs pager iohelp fshelp store ports ihash shouldbeinlibc
-OTHERLIBS = -lpthread $(and $(HAVE_LIBBZ2),-lbz2) $(and $(HAVE_LIBZ),-lz)
+LDLIBS = -lpthread $(and $(HAVE_LIBBZ2),-lbz2) $(and $(HAVE_LIBZ),-lz)
include ../Makeconf
diff --git a/fatfs/Makefile b/fatfs/Makefile
index 6224b644..ee8cd83d 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 $(and $(HAVE_LIBBZ2),-lbz2) $(and $(HAVE_LIBZ),-lz)
+LDLIBS = -lpthread $(and $(HAVE_LIBBZ2),-lbz2) $(and $(HAVE_LIBZ),-lz)
include ../Makeconf
diff --git a/ftpfs/Makefile b/ftpfs/Makefile
index 70398908..ec8a6730 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
+LDLIBS = -lpthread
include ../Makeconf
diff --git a/hostmux/Makefile b/hostmux/Makefile
index 939a9f62..4776ac9c 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
+LDLIBS = -lpthread
include ../Makeconf
diff --git a/isofs/Makefile b/isofs/Makefile
index 6475c521..25ac09aa 100644
--- a/isofs/Makefile
+++ b/isofs/Makefile
@@ -22,7 +22,7 @@ SRCS = inode.c main.c lookup.c pager.c rr.c
OBJS = $(SRCS:.c=.o)
HURDLIBS = diskfs iohelp fshelp store pager ports ihash shouldbeinlibc
-OTHERLIBS = -lpthread $(and $(HAVE_LIBBZ2),-lbz2) $(and $(HAVE_LIBZ),-lz)
+LDLIBS = -lpthread $(and $(HAVE_LIBBZ2),-lbz2) $(and $(HAVE_LIBZ),-lz)
include ../Makeconf
diff --git a/libhurd-slab/Makefile b/libhurd-slab/Makefile
index 925f70c1..7bb0e593 100644
--- a/libhurd-slab/Makefile
+++ b/libhurd-slab/Makefile
@@ -26,7 +26,7 @@ installhdrs = slab.h
MIGSTUBS =
OBJS = $(sort $(SRCS:.c=.o) $(MIGSTUBS))
-OTHERLIBS = -lpthread
+LDLIBS = -lpthread
MIGCOMSFLAGS =
diff --git a/mach-defpager/Makefile b/mach-defpager/Makefile
index 4f987fae..d95b8b0a 100644
--- a/mach-defpager/Makefile
+++ b/mach-defpager/Makefile
@@ -30,8 +30,8 @@ OBJS := $(SRCS:.c=.o) \
default_pager_replyUser.o
HURDLIBS:= ihash
-OTHERLIBS:= -lpthread
LDFLAGS += -static
+LDLIBS:= -lpthread
include ../Makeconf
diff --git a/nfs/Makefile b/nfs/Makefile
index d814f67d..265d0273 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
+LDLIBS = -lpthread
include ../Makeconf
diff --git a/nfsd/Makefile b/nfsd/Makefile
index 6ac6dd4f..5dc9a4da 100644
--- a/nfsd/Makefile
+++ b/nfsd/Makefile
@@ -25,7 +25,7 @@ OBJS = $(subst .c,.o,$(SRCS))
target = nfsd
installationdir = $(sbindir)
HURDLIBS = shouldbeinlibc
-OTHERLIBS = -lpthread
+LDLIBS = -lpthread
include ../Makeconf
diff --git a/pfinet/Makefile b/pfinet/Makefile
index 10b90ebb..74cedcf6 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
+LDLIBS = -lpthread
target = pfinet
diff --git a/pflocal/Makefile b/pflocal/Makefile
index bfc2f4e8..0d9341f1 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
+LDLIBS = -lpthread
MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h
diff --git a/proc/Makefile b/proc/Makefile
index 2275a663..8ca13c20 100644
--- a/proc/Makefile
+++ b/proc/Makefile
@@ -31,8 +31,7 @@ MIGSTUBS = processServer.o notifyServer.o \
task_notifyServer.o
OBJS = $(SRCS:.c=.o) $(MIGSTUBS)
HURDLIBS = ihash ports shouldbeinlibc
-
-OTHERLIBS = -lpthread
+LDLIBS = -lpthread
include ../Makeconf
diff --git a/procfs/Makefile b/procfs/Makefile
index 78f20c43..12fc9eee 100644
--- a/procfs/Makefile
+++ b/procfs/Makefile
@@ -26,6 +26,6 @@ LCLHDRS = dircat.h main.h process.h procfs.h procfs_dir.h proclist.h rootdir.h
OBJS = $(SRCS:.c=.o)
HURDLIBS = netfs fshelp iohelp ps ports ihash shouldbeinlibc
-OTHERLIBS = -lpthread
+LDLIBS = -lpthread
include ../Makeconf
diff --git a/random/Makefile b/random/Makefile
index 5bdc9b1e..5f8a62cb 100644
--- a/random/Makefile
+++ b/random/Makefile
@@ -25,6 +25,6 @@ SRCS = random.c gnupg-random.c gnupg-rmd160.c
OBJS = $(SRCS:.c=.o) startup_notifyServer.o
LCLHDRS = gnupg-random.h gnupg-rmd.h gnupg-bithelp.h random.h
HURDLIBS = trivfs ports fshelp ihash iohelp shouldbeinlibc
-OTHERLIBS = -lpthread
+LDLIBS = -lpthread
include ../Makeconf
diff --git a/storeio/Makefile b/storeio/Makefile
index c1317587..83b7684d 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
+LDLIBS = -lpthread
include ../Makeconf
diff --git a/term/Makefile b/term/Makefile
index 78766041..df91c212 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
+LDLIBS = -lpthread
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 fdcae349..bcb76e9a 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
+LDLIBS = -lpthread
include ../Makeconf
diff --git a/usermux/Makefile b/usermux/Makefile
index c30b5ab4..8df24d4e 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
+LDLIBS = -lpthread
include ../Makeconf