aboutsummaryrefslogtreecommitdiff
path: root/lib/libmagic
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2018-03-09 18:51:24 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2018-03-09 18:51:24 +0000
commit7fe5130df9a3b9cf0aafe22c24344e7a69acb14d (patch)
treed8d77fa4688354185047e5d18a4440a777c7237a /lib/libmagic
parent3244729fbb81868b5e4b84f48e7e2ac11c03817e (diff)
downloadsrc-7fe5130df9a3b9cf0aafe22c24344e7a69acb14d.tar.gz
src-7fe5130df9a3b9cf0aafe22c24344e7a69acb14d.zip
LIB32: Avoid linking in unneeded (and invalid lib32) libz for libmagic build tool.
Usually this is just ignored: /usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.so when searching for -lz /usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.a when searching for -lz However some combination of newer toolchains simply fail here instead: /usr/bin/ld: error: /home/dstolfa/obj/home/dstolfa/cadets/amd64.amd64/obj-lib32/lib/libz/libz.so is incompatible with /usr/lib/crt1.o Libz is not needed for mkmagic so just exclude it. Reported by: Domagoj Stolfa <domagoj.stolfa@gmail.com> MFC after: 2 weeks Sponsored by: Dell EMC
Notes
Notes: svn path=/head/; revision=330702
Diffstat (limited to 'lib/libmagic')
-rw-r--r--lib/libmagic/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libmagic/Makefile b/lib/libmagic/Makefile
index 65fdc755360a..ea2a7b6da9f3 100644
--- a/lib/libmagic/Makefile
+++ b/lib/libmagic/Makefile
@@ -8,7 +8,9 @@ CONTRDIR= ${SRCTOP}/contrib/file
LIB= magic
SHLIB_MAJOR= 4
+.if !make(build-tools)
LIBADD= z
+.endif
MAN= libmagic.3 magic.5
SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \