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
This commit is contained in:
Bryan Drewery 2018-03-09 18:51:24 +00:00
parent 3244729fbb
commit 7fe5130df9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=330702

View File

@ -8,7 +8,9 @@ CONTRDIR= ${SRCTOP}/contrib/file
LIB= magic LIB= magic
SHLIB_MAJOR= 4 SHLIB_MAJOR= 4
.if !make(build-tools)
LIBADD= z LIBADD= z
.endif
MAN= libmagic.3 magic.5 MAN= libmagic.3 magic.5
SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \ SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \